removed overlayplacement.js from the build

This commit is contained in:
thatcher 2011-12-13 17:40:52 -05:00
parent 97d2f0c765
commit d702810ae7
2 changed files with 122 additions and 123 deletions

View File

@ -24,7 +24,6 @@
<file name="src/utils.js" /> <file name="src/utils.js" />
<file name="src/mousetracker.js" /> <file name="src/mousetracker.js" />
<file name="src/controlanchor.js" /> <file name="src/controlanchor.js" />
<file name="src/overlayplacement.js" />
<file name="src/navcontrol.js" /> <file name="src/navcontrol.js" />
<file name="src/control.js" /> <file name="src/control.js" />
<file name="src/viewer.js" /> <file name="src/viewer.js" />

View File

@ -1218,26 +1218,6 @@ $.Utils = new $.Utils();
}( OpenSeadragon )); }( OpenSeadragon ));
(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 ));
(function( $ ){ (function( $ ){
$.NavControl = function(viewer) { $.NavControl = function(viewer) {
@ -2601,8 +2581,12 @@ $.TileSource.prototype = {
tileExists: function( level, x, y ) { tileExists: function( level, x, y ) {
var numTiles = this.getNumTiles( level ); var numTiles = this.getNumTiles( level );
return level >= this.minLevel && level <= this.maxLevel && return level >= this.minLevel &&
x >= 0 && y >= 0 && x < numTiles.x && y < numTiles.y; level <= this.maxLevel &&
x >= 0 &&
y >= 0 &&
x < numTiles.x &&
y < numTiles.y;
} }
}; };
@ -3415,14 +3399,30 @@ $.Tile.prototype = {
(function( $ ){ (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) { $.Overlay = function(elmt, loc, placement) {
this.elmt = elmt; this.elmt = elmt;
this.scales = (loc instanceof $.Rect); this.scales = (loc instanceof $.Rect);
this.bounds = new $.Rect(loc.x, loc.y, loc.width, loc.height); 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.position = new $.Point(loc.x, loc.y);
this.size = new $.Point(loc.width, loc.height); this.size = new $.Point(loc.width, loc.height);
this.style = elmt.style; this.style = elmt.style;
// rects are always top-left
this.placement = loc instanceof $.Point ?
placement :
$.OverlayPlacement.TOP_LEFT;
}; };
$.Overlay.prototype = { $.Overlay.prototype = {