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, element: element,
location: options.location, location: options.location,
placement: options.placement, placement: options.placement,
onDraw: onDraw onDraw: options.onDraw
}) ); }) );
this.updateAgain = true; this.updateAgain = true;
if( this.viewer ){ if( this.viewer ){

View File

@ -91,7 +91,6 @@
options.placement : options.placement :
$.OverlayPlacement.TOP_LEFT; $.OverlayPlacement.TOP_LEFT;
this.onDraw = options.onDraw; this.onDraw = options.onDraw;
this.imageFullSize = options.imageFullSize;
}; };
$.Overlay.prototype = { $.Overlay.prototype = {
@ -198,9 +197,10 @@
position = position.apply( Math.floor ); position = position.apply( Math.floor );
size = size.apply( Math.ceil ); 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) { if (this.onDraw) {
this.onDraw(this.position, this.size, element); this.onDraw(position, size, element);
} else { } else {
style.left = position.x + "px"; style.left = position.x + "px";
style.top = position.y + "px"; style.top = position.y + "px";