mirror of
https://github.com/openseadragon/openseadragon.git
synced 2025-01-31 23:21:42 +03:00
drawer: don't leak drawLevel into global namespace
This code is still under-tested and documented but no longer relies on `drawLevel` being leaked into the global namespace where `updateLevel` to find it. See #145
This commit is contained in:
parent
c2107fcb22
commit
c648c1df8a
@ -527,7 +527,9 @@ function updateViewport( drawer ) {
|
||||
lowestLevel = Math.min( lowestLevel, highestLevel );
|
||||
|
||||
//TODO
|
||||
var drawLevel; // FIXME: drawLevel should have a more explanatory name
|
||||
for ( level = highestLevel; level >= lowestLevel; level-- ) {
|
||||
drawLevel = false;
|
||||
|
||||
//Avoid calculations for draw if we have already drawn this
|
||||
renderPixelRatioC = drawer.viewport.deltaPixelsFromPoints(
|
||||
@ -572,6 +574,7 @@ function updateViewport( drawer ) {
|
||||
best = updateLevel(
|
||||
drawer,
|
||||
haveDrawn,
|
||||
drawLevel,
|
||||
level,
|
||||
levelOpacity,
|
||||
levelVisibility,
|
||||
@ -601,7 +604,7 @@ function updateViewport( drawer ) {
|
||||
}
|
||||
|
||||
|
||||
function updateLevel( drawer, haveDrawn, level, levelOpacity, levelVisibility, viewportTL, viewportBR, currentTime, best ){
|
||||
function updateLevel( drawer, haveDrawn, drawLevel, level, levelOpacity, levelVisibility, viewportTL, viewportBR, currentTime, best ){
|
||||
|
||||
var x, y,
|
||||
tileTL,
|
||||
|
Loading…
x
Reference in New Issue
Block a user