mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 21:26:10 +03:00
Fixed another potential timer leak when closing a viewer
If the viewer was closed in response to an event raised during the update function, the timer would have continued running.
This commit is contained in:
parent
0112f6a4ea
commit
4224960252
@ -1468,9 +1468,12 @@ function updateMulti( viewer ) {
|
|||||||
beginTime = +new Date();
|
beginTime = +new Date();
|
||||||
updateOnce( viewer );
|
updateOnce( viewer );
|
||||||
|
|
||||||
|
// Request the next frame, unless we've been closed during the updateOnce()
|
||||||
|
if ( viewer.source ) {
|
||||||
THIS[ viewer.hash ].updateRequestId = scheduleUpdate( viewer,
|
THIS[ viewer.hash ].updateRequestId = scheduleUpdate( viewer,
|
||||||
arguments.callee, beginTime );
|
arguments.callee, beginTime );
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function updateOnce( viewer ) {
|
function updateOnce( viewer ) {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user