mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-24 22:26:10 +03:00
update tiled-image-drawn event description
This commit is contained in:
parent
58f918aaa1
commit
9725ac0398
@ -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,17 +481,17 @@ 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.
|
||||
*
|
||||
* @event tiled-image-drawn
|
||||
* @memberof OpenSeadragon.Viewer
|
||||
* @type {object}
|
||||
* @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
|
||||
* @property {OpenSeadragon.TiledImage} tiledImage - Which TiledImage is being drawn.
|
||||
* @property {Array} tiles - An array of Tile objects that were drawn.
|
||||
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
||||
*/
|
||||
* 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
|
||||
* @type {object}
|
||||
* @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
|
||||
* @property {OpenSeadragon.TiledImage} tiledImage - Which TiledImage is being drawn.
|
||||
* @property {Array} tiles - An array of Tile objects that were drawn.
|
||||
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
||||
*/
|
||||
this.viewer.raiseEvent( 'tiled-image-drawn', {
|
||||
tiledImage: tiledImage,
|
||||
tiles: lastDrawn,
|
||||
|
@ -352,22 +352,20 @@
|
||||
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.
|
||||
*
|
||||
* @event tiled-image-drawn
|
||||
* @memberof OpenSeadragon.Viewer
|
||||
* @type {object}
|
||||
* @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
|
||||
* @property {OpenSeadragon.TiledImage} tiledImage - Which TiledImage is being drawn.
|
||||
* @property {Array} tiles - An array of Tile objects that were drawn.
|
||||
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
||||
*/
|
||||
* 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
|
||||
* @type {object}
|
||||
* @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
|
||||
* @property {OpenSeadragon.TiledImage} tiledImage - Which TiledImage is being drawn.
|
||||
* @property {Array} tiles - An array of Tile objects that were drawn.
|
||||
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
||||
*/
|
||||
this.viewer.raiseEvent( 'tiled-image-drawn', {
|
||||
tiledImage: tiledImage,
|
||||
tiles: tilesToDraw.map(info => info.tile),
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user