mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 14:46:10 +03:00
removed initialize anti pattern from constructor in favor of doing initialization in constructor in navcontrol.js
This commit is contained in:
parent
114a26b1a9
commit
b061a4d830
@ -1230,11 +1230,7 @@ $.NavControl = function(viewer) {
|
||||
this.config = this._viewer.config;
|
||||
|
||||
this.elmt = null;
|
||||
this.initialize();
|
||||
};
|
||||
|
||||
$.NavControl.prototype = {
|
||||
initialize: function() {
|
||||
var beginZoomingInHandler = $.delegate(this, this._beginZoomingIn);
|
||||
var endZoomingHandler = $.delegate(this, this._endZooming);
|
||||
var doSingleZoomInHandler = $.delegate(this, this._doSingleZoomIn);
|
||||
@ -1297,7 +1293,10 @@ $.NavControl.prototype = {
|
||||
this.elmt = this._group.element;
|
||||
this.elmt[ $.SIGNAL ] = true; // hack to get our controls to fade
|
||||
this._viewer.addHandler('open', $.delegate(this, this._lightUp));
|
||||
},
|
||||
};
|
||||
|
||||
$.NavControl.prototype = {
|
||||
|
||||
_resolveUrl: function(url) {
|
||||
var prefix = this._viewer.prefixUrl;
|
||||
return prefix ? prefix + url : url;
|
||||
|
@ -10,11 +10,7 @@ $.NavControl = function(viewer) {
|
||||
this.config = this._viewer.config;
|
||||
|
||||
this.elmt = null;
|
||||
this.initialize();
|
||||
};
|
||||
|
||||
$.NavControl.prototype = {
|
||||
initialize: function() {
|
||||
var beginZoomingInHandler = $.delegate(this, this._beginZoomingIn);
|
||||
var endZoomingHandler = $.delegate(this, this._endZooming);
|
||||
var doSingleZoomInHandler = $.delegate(this, this._doSingleZoomIn);
|
||||
@ -77,7 +73,10 @@ $.NavControl.prototype = {
|
||||
this.elmt = this._group.element;
|
||||
this.elmt[ $.SIGNAL ] = true; // hack to get our controls to fade
|
||||
this._viewer.addHandler('open', $.delegate(this, this._lightUp));
|
||||
},
|
||||
};
|
||||
|
||||
$.NavControl.prototype = {
|
||||
|
||||
_resolveUrl: function(url) {
|
||||
var prefix = this._viewer.prefixUrl;
|
||||
return prefix ? prefix + url : url;
|
||||
|
Loading…
Reference in New Issue
Block a user