mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 14:46:10 +03:00
moved only relevant object literal from controlanchor.js into control.js, deleted controlanchor.js and removed it from the build
This commit is contained in:
parent
c9034f3f96
commit
c35ee2bca9
@ -23,7 +23,6 @@
|
||||
<file name="src/eventhandlerlist.js" />
|
||||
<file name="src/utils.js" />
|
||||
<file name="src/mousetracker.js" />
|
||||
<file name="src/controlanchor.js" />
|
||||
<file name="src/navcontrol.js" />
|
||||
<file name="src/control.js" />
|
||||
<file name="src/viewer.js" />
|
||||
|
@ -1198,26 +1198,6 @@ $.Utils = new $.Utils();
|
||||
|
||||
}( OpenSeadragon ));
|
||||
|
||||
(function( $ ){
|
||||
|
||||
|
||||
$.ControlAnchor = function() {
|
||||
throw Error.invalidOperation();
|
||||
};
|
||||
|
||||
$.ControlAnchor = {
|
||||
NONE: 0,
|
||||
TOP_LEFT: 1,
|
||||
TOP_RIGHT: 2,
|
||||
BOTTOM_RIGHT: 3,
|
||||
BOTTOM_LEFT: 4
|
||||
};
|
||||
|
||||
$.ControlAnchor = $.ControlAnchor;
|
||||
|
||||
}( OpenSeadragon ));
|
||||
|
||||
|
||||
(function( $ ){
|
||||
|
||||
$.NavControl = function(viewer) {
|
||||
@ -1381,6 +1361,14 @@ $.NavControl.prototype = {
|
||||
(function( $ ){
|
||||
|
||||
|
||||
$.ControlAnchor = {
|
||||
NONE: 0,
|
||||
TOP_LEFT: 1,
|
||||
TOP_RIGHT: 2,
|
||||
BOTTOM_RIGHT: 3,
|
||||
BOTTOM_LEFT: 4
|
||||
};
|
||||
|
||||
$.Control = function (elmt, anchor, container) {
|
||||
this.elmt = elmt;
|
||||
this.anchor = anchor;
|
||||
@ -1388,11 +1376,14 @@ $.Control = function (elmt, anchor, container) {
|
||||
this.wrapper = $.Utils.makeNeutralElement("span");
|
||||
this.wrapper.style.display = "inline-block";
|
||||
this.wrapper.appendChild(this.elmt);
|
||||
|
||||
if (this.anchor == $.ControlAnchor.NONE) {
|
||||
this.wrapper.style.width = this.wrapper.style.height = "100%"; // IE6 fix
|
||||
// IE6 fix
|
||||
this.wrapper.style.width = this.wrapper.style.height = "100%";
|
||||
}
|
||||
|
||||
if (this.anchor == $.ControlAnchor.TOP_RIGHT || this.anchor == $.ControlAnchor.BOTTOM_RIGHT) {
|
||||
if ( this.anchor == $.ControlAnchor.TOP_RIGHT ||
|
||||
this.anchor == $.ControlAnchor.BOTTOM_RIGHT ) {
|
||||
this.container.insertBefore(this.wrapper, this.container.firstChild);
|
||||
} else {
|
||||
this.container.appendChild(this.wrapper);
|
||||
|
@ -2,6 +2,14 @@
|
||||
(function( $ ){
|
||||
|
||||
|
||||
$.ControlAnchor = {
|
||||
NONE: 0,
|
||||
TOP_LEFT: 1,
|
||||
TOP_RIGHT: 2,
|
||||
BOTTOM_RIGHT: 3,
|
||||
BOTTOM_LEFT: 4
|
||||
};
|
||||
|
||||
$.Control = function (elmt, anchor, container) {
|
||||
this.elmt = elmt;
|
||||
this.anchor = anchor;
|
||||
@ -9,11 +17,14 @@ $.Control = function (elmt, anchor, container) {
|
||||
this.wrapper = $.Utils.makeNeutralElement("span");
|
||||
this.wrapper.style.display = "inline-block";
|
||||
this.wrapper.appendChild(this.elmt);
|
||||
|
||||
if (this.anchor == $.ControlAnchor.NONE) {
|
||||
this.wrapper.style.width = this.wrapper.style.height = "100%"; // IE6 fix
|
||||
// IE6 fix
|
||||
this.wrapper.style.width = this.wrapper.style.height = "100%";
|
||||
}
|
||||
|
||||
if (this.anchor == $.ControlAnchor.TOP_RIGHT || this.anchor == $.ControlAnchor.BOTTOM_RIGHT) {
|
||||
if ( this.anchor == $.ControlAnchor.TOP_RIGHT ||
|
||||
this.anchor == $.ControlAnchor.BOTTOM_RIGHT ) {
|
||||
this.container.insertBefore(this.wrapper, this.container.firstChild);
|
||||
} else {
|
||||
this.container.appendChild(this.wrapper);
|
||||
|
@ -1,20 +0,0 @@
|
||||
|
||||
(function( $ ){
|
||||
|
||||
|
||||
$.ControlAnchor = function() {
|
||||
throw Error.invalidOperation();
|
||||
};
|
||||
|
||||
$.ControlAnchor = {
|
||||
NONE: 0,
|
||||
TOP_LEFT: 1,
|
||||
TOP_RIGHT: 2,
|
||||
BOTTOM_RIGHT: 3,
|
||||
BOTTOM_LEFT: 4
|
||||
};
|
||||
|
||||
$.ControlAnchor = $.ControlAnchor;
|
||||
|
||||
}( OpenSeadragon ));
|
||||
|
Loading…
Reference in New Issue
Block a user