mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-22 05:06:09 +03:00
removed overlayplacement.js and moved it's only relevant object literal directly into overlay.js
This commit is contained in:
parent
7cac08a2f4
commit
97d2f0c765
@ -1,14 +1,30 @@
|
||||
|
||||
(function( $ ){
|
||||
|
||||
|
||||
$.OverlayPlacement = {
|
||||
CENTER: 0,
|
||||
TOP_LEFT: 1,
|
||||
TOP: 2,
|
||||
TOP_RIGHT: 3,
|
||||
RIGHT: 4,
|
||||
BOTTOM_RIGHT: 5,
|
||||
BOTTOM: 6,
|
||||
BOTTOM_LEFT: 7,
|
||||
LEFT: 8
|
||||
};
|
||||
|
||||
$.Overlay = function(elmt, loc, placement) {
|
||||
this.elmt = elmt;
|
||||
this.scales = (loc instanceof $.Rect);
|
||||
this.bounds = new $.Rect(loc.x, loc.y, loc.width, loc.height);
|
||||
this.placement = loc instanceof $.Point ? placement : $.OverlayPlacement.TOP_LEFT; // rects are always top-left
|
||||
this.position = new $.Point(loc.x, loc.y);
|
||||
this.size = new $.Point(loc.width, loc.height);
|
||||
this.style = elmt.style;
|
||||
// rects are always top-left
|
||||
this.placement = loc instanceof $.Point ?
|
||||
placement :
|
||||
$.OverlayPlacement.TOP_LEFT;
|
||||
};
|
||||
|
||||
$.Overlay.prototype = {
|
||||
|
@ -1,20 +0,0 @@
|
||||
|
||||
(function( $ ){
|
||||
|
||||
$.OverlayPlacement = function() {
|
||||
throw Error.invalidOperation();
|
||||
};
|
||||
|
||||
$.OverlayPlacement = {
|
||||
CENTER: 0,
|
||||
TOP_LEFT: 1,
|
||||
TOP: 2,
|
||||
TOP_RIGHT: 3,
|
||||
RIGHT: 4,
|
||||
BOTTOM_RIGHT: 5,
|
||||
BOTTOM: 6,
|
||||
BOTTOM_LEFT: 7,
|
||||
LEFT: 8
|
||||
};
|
||||
|
||||
}( OpenSeadragon ));
|
Loading…
Reference in New Issue
Block a user