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,8 +1468,11 @@ function updateMulti( viewer ) {
|
|||||||
beginTime = +new Date();
|
beginTime = +new Date();
|
||||||
updateOnce( viewer );
|
updateOnce( viewer );
|
||||||
|
|
||||||
THIS[ viewer.hash ].updateRequestId = scheduleUpdate( viewer,
|
// Request the next frame, unless we've been closed during the updateOnce()
|
||||||
arguments.callee, beginTime );
|
if ( viewer.source ) {
|
||||||
|
THIS[ viewer.hash ].updateRequestId = scheduleUpdate( viewer,
|
||||||
|
arguments.callee, beginTime );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function updateOnce( viewer ) {
|
function updateOnce( viewer ) {
|
||||||
|
Loading…
Reference in New Issue
Block a user