diff --git a/src/drawer.js b/src/drawer.js index 60a85890..72c932d5 100644 --- a/src/drawer.js +++ b/src/drawer.js @@ -94,6 +94,7 @@ $.Drawer = function( options ) { $.extend( true, this, { //internal state properties + viewer: null, downloading: 0, tilesMatrix: {}, tilesLoaded: [], diff --git a/src/viewer.js b/src/viewer.js index 8be9ec48..6eed9106 100644 --- a/src/viewer.js +++ b/src/viewer.js @@ -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, diff --git a/test/formats.js b/test/formats.js index 23ef1cc4..3505975b 100644 --- a/test/formats.js +++ b/test/formats.js @@ -23,7 +23,6 @@ var openHandler = function(eventSender, eventData) { viewer.removeHandler('open', openHandler); ok(true, 'Open event was sent'); - viewer.drawer.viewer = viewer; viewer.addHandler('tile-drawn', tileDrawnHandler); };