mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-29 08:36:10 +03:00
Use the correct onDraw in drawer.js. Remove imageFullSize and fix up the comment for onDraw
This commit is contained in:
parent
4239bb7adc
commit
2717398181
@ -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 ){
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user