From 271739818125b5e25f33c40f82fa2e0e1ea8ceb9 Mon Sep 17 00:00:00 2001 From: Luke Murray Date: Thu, 1 Aug 2013 13:36:00 +1000 Subject: [PATCH] Use the correct onDraw in drawer.js. Remove imageFullSize and fix up the comment for onDraw --- src/drawer.js | 2 +- src/overlay.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/drawer.js b/src/drawer.js index e5b5c0d1..75c18631 100644 --- a/src/drawer.js +++ b/src/drawer.js @@ -196,7 +196,7 @@ $.Drawer.prototype = { element: element, location: options.location, placement: options.placement, - onDraw: onDraw + onDraw: options.onDraw }) ); this.updateAgain = true; if( this.viewer ){ diff --git a/src/overlay.js b/src/overlay.js index a71db596..8635499f 100644 --- a/src/overlay.js +++ b/src/overlay.js @@ -91,7 +91,6 @@ options.placement : $.OverlayPlacement.TOP_LEFT; this.onDraw = options.onDraw; - this.imageFullSize = options.imageFullSize; }; $.Overlay.prototype = { @@ -198,9 +197,10 @@ position = position.apply( Math.floor ); size = size.apply( Math.ceil ); - // call the onDraw callback if there is one to allow them to dping + // call the onDraw callback if there is one to allow, this allows someone to overwrite + // the drawing/positioning/sizing of the overlay if (this.onDraw) { - this.onDraw(this.position, this.size, element); + this.onDraw(position, size, element); } else { style.left = position.x + "px"; style.top = position.y + "px";