mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +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);
|
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.
|
// Fire tiled-image-drawn event.
|
||||||
if( this.viewer ){
|
if( this.viewer ){
|
||||||
/**
|
/**
|
||||||
* Raised when a tiled image is drawn to the canvas. Only valid
|
* Raised when a tiled image is drawn to the canvas. Used internally for testing.
|
||||||
* for webgl and canvas drawers.
|
* The update-viewport event is preferred if you want to know when a frame has been drawn.
|
||||||
*
|
*
|
||||||
* @event tiled-image-drawn
|
* @event tiled-image-drawn
|
||||||
* @memberof OpenSeadragon.Viewer
|
* @memberof OpenSeadragon.Viewer
|
||||||
* @type {object}
|
* @type {object}
|
||||||
* @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
|
* @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
|
||||||
* @property {OpenSeadragon.TiledImage} tiledImage - Which TiledImage is being drawn.
|
* @property {OpenSeadragon.TiledImage} tiledImage - Which TiledImage is being drawn.
|
||||||
* @property {Array} tiles - An array of Tile objects that were drawn.
|
* @property {Array} tiles - An array of Tile objects that were drawn.
|
||||||
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
||||||
*/
|
*/
|
||||||
this.viewer.raiseEvent( 'tiled-image-drawn', {
|
this.viewer.raiseEvent( 'tiled-image-drawn', {
|
||||||
tiledImage: tiledImage,
|
tiledImage: tiledImage,
|
||||||
tiles: lastDrawn,
|
tiles: lastDrawn,
|
||||||
|
@ -352,22 +352,20 @@
|
|||||||
gl.clear(gl.COLOR_BUFFER_BIT); // clear the back buffer
|
gl.clear(gl.COLOR_BUFFER_BIT); // clear the back buffer
|
||||||
}
|
}
|
||||||
|
|
||||||
// Fire tiled-image-drawn event.
|
// Fire tiled-image-drawn event. This is used for the tests
|
||||||
// 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?
|
|
||||||
if( this.viewer ){
|
if( this.viewer ){
|
||||||
/**
|
/**
|
||||||
* Raised when a tiled image is drawn to the canvas. Only valid
|
* Raised when a tiled image is drawn to the canvas. Used internally for testing.
|
||||||
* for webgl and canvas drawers.
|
* The update-viewport event is preferred if you want to know when a frame has been drawn.
|
||||||
*
|
*
|
||||||
* @event tiled-image-drawn
|
* @event tiled-image-drawn
|
||||||
* @memberof OpenSeadragon.Viewer
|
* @memberof OpenSeadragon.Viewer
|
||||||
* @type {object}
|
* @type {object}
|
||||||
* @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
|
* @property {OpenSeadragon.Viewer} eventSource - A reference to the Viewer which raised the event.
|
||||||
* @property {OpenSeadragon.TiledImage} tiledImage - Which TiledImage is being drawn.
|
* @property {OpenSeadragon.TiledImage} tiledImage - Which TiledImage is being drawn.
|
||||||
* @property {Array} tiles - An array of Tile objects that were drawn.
|
* @property {Array} tiles - An array of Tile objects that were drawn.
|
||||||
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
* @property {?Object} userData - Arbitrary subscriber-defined object.
|
||||||
*/
|
*/
|
||||||
this.viewer.raiseEvent( 'tiled-image-drawn', {
|
this.viewer.raiseEvent( 'tiled-image-drawn', {
|
||||||
tiledImage: tiledImage,
|
tiledImage: tiledImage,
|
||||||
tiles: tilesToDraw.map(info => info.tile),
|
tiles: tilesToDraw.map(info => info.tile),
|
||||||
@ -380,24 +378,6 @@
|
|||||||
this._outputContext.drawImage(this._renderingCanvas, 0, 0);
|
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
|
// Public API required by all Drawer implementations
|
||||||
|
Loading…
Reference in New Issue
Block a user