update tiled-image-drawn event description

This commit is contained in:
Tom 2024-01-10 12:21:05 -05:00
parent 58f918aaa1
commit 9725ac0398
2 changed files with 23 additions and 61 deletions

View File

@ -101,24 +101,6 @@ class CanvasDrawer extends $.DrawerBase{
this._drawTiles(tiledImage);
}
}
// // Fire the frame-drawn event.
// if( this.viewer ){
// /**
// * Raised when a tiled image is drawn to the canvas. Only valid
// * for webgl and canvas drawers.
// *
// * @event tiled-image-drawn
// * @memberof OpenSeadragon.Viewer
// * @type {object}
// * @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
// * @property {HTMLElement} canvas - The canvas which has been drawn onto
// * @property {?Object} userData - Arbitrary subscriber-defined object.
// */
// this.viewer.raiseEvent( 'frame-drawn', {
// canvas: this.canvas
// });
// }
}
/**
@ -499,8 +481,8 @@ class CanvasDrawer extends $.DrawerBase{
// Fire tiled-image-drawn event.
if( this.viewer ){
/**
* Raised when a tiled image is drawn to the canvas. Only valid
* for webgl and canvas drawers.
* Raised when a tiled image is drawn to the canvas. Used internally for testing.
* The update-viewport event is preferred if you want to know when a frame has been drawn.
*
* @event tiled-image-drawn
* @memberof OpenSeadragon.Viewer

View File

@ -352,13 +352,11 @@
gl.clear(gl.COLOR_BUFFER_BIT); // clear the back buffer
}
// Fire tiled-image-drawn event.
// TODO: for discussion: do we need to ensure the image has been drawn to the output canvas already?
// Is it possible the image data may not be on the output canvas? Does it matter?
// Fire tiled-image-drawn event. This is used for the tests
if( this.viewer ){
/**
* Raised when a tiled image is drawn to the canvas. Only valid
* for webgl and canvas drawers.
* Raised when a tiled image is drawn to the canvas. Used internally for testing.
* The update-viewport event is preferred if you want to know when a frame has been drawn.
*
* @event tiled-image-drawn
* @memberof OpenSeadragon.Viewer
@ -380,24 +378,6 @@
this._outputContext.drawImage(this._renderingCanvas, 0, 0);
}
// // Fire the frame-drawn event.
// if( this.viewer ){
// /**
// * Raised when a tiled image is drawn to the canvas. Only valid
// * for webgl and canvas drawers.
// *
// * @event tiled-image-drawn
// * @memberof OpenSeadragon.Viewer
// * @type {object}
// * @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
// * @property {HTMLElement} canvas - The canvas which has been drawn onto
// * @property {?Object} userData - Arbitrary subscriber-defined object.
// */
// this.viewer.raiseEvent( 'frame-drawn', {
// canvas: this.canvas
// });
// }
}
// Public API required by all Drawer implementations