mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 13:16:10 +03:00
Fix Drawer event emission
Drawer tries to emit events on the parent Viewer object but doesn't have a reference to it. Add a reference when constructing the Drawer.
This commit is contained in:
parent
c78f3ef743
commit
fa1a8b2dde
@ -94,6 +94,7 @@ $.Drawer = function( options ) {
|
|||||||
$.extend( true, this, {
|
$.extend( true, this, {
|
||||||
|
|
||||||
//internal state properties
|
//internal state properties
|
||||||
|
viewer: null,
|
||||||
downloading: 0,
|
downloading: 0,
|
||||||
tilesMatrix: {},
|
tilesMatrix: {},
|
||||||
tilesLoaded: [],
|
tilesLoaded: [],
|
||||||
|
@ -1047,6 +1047,7 @@ function openTileSource( viewer, source ) {
|
|||||||
_this.source.overlays = _this.source.overlays || [];
|
_this.source.overlays = _this.source.overlays || [];
|
||||||
|
|
||||||
_this.drawer = new $.Drawer({
|
_this.drawer = new $.Drawer({
|
||||||
|
viewer: _this,
|
||||||
source: _this.source,
|
source: _this.source,
|
||||||
viewport: _this.viewport,
|
viewport: _this.viewport,
|
||||||
element: _this.canvas,
|
element: _this.canvas,
|
||||||
|
Loading…
Reference in New Issue
Block a user