Use the correct onDraw in drawer.js. Remove imageFullSize and fix up the comment for onDraw

This commit is contained in:
Luke Murray 2013-08-01 13:36:00 +10:00
parent 4239bb7adc
commit 2717398181
2 changed files with 4 additions and 4 deletions

View File

@ -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 ){

View File

@ -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";