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:
Benjamin Gilbert 2013-05-16 02:49:29 -04:00
parent c78f3ef743
commit fa1a8b2dde
2 changed files with 2 additions and 0 deletions

View File

@ -94,6 +94,7 @@ $.Drawer = function( options ) {
$.extend( true, this, {
//internal state properties
viewer: null,
downloading: 0,
tilesMatrix: {},
tilesLoaded: [],

View File

@ -1047,6 +1047,7 @@ function openTileSource( viewer, source ) {
_this.source.overlays = _this.source.overlays || [];
_this.drawer = new $.Drawer({
viewer: _this,
source: _this.source,
viewport: _this.viewport,
element: _this.canvas,