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,
|
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 ){
|
||||||
|
@ -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";
|
||||||
|
Loading…
Reference in New Issue
Block a user