mirror of
https://github.com/openseadragon/openseadragon.git
synced 2024-11-25 14:46:10 +03:00
removed _init anti-pattern from drawer constructor
This commit is contained in:
parent
c35ee2bca9
commit
9b5cf799bf
@ -50,18 +50,16 @@ $.Drawer = function(source, viewport, elmt) {
|
||||
this.elmt = this._container;
|
||||
|
||||
|
||||
this._init();
|
||||
|
||||
this._canvas.style.width = "100%";
|
||||
this._canvas.style.height = "100%";
|
||||
this._canvas.style.position = "absolute";
|
||||
this._container.style.textAlign = "left"; // explicit left-align
|
||||
this._container.appendChild(this._canvas);
|
||||
};
|
||||
|
||||
$.Drawer.prototype = {
|
||||
|
||||
_init: function() {
|
||||
this._canvas.style.width = "100%";
|
||||
this._canvas.style.height = "100%";
|
||||
this._canvas.style.position = "absolute";
|
||||
this._container.style.textAlign = "left"; // explicit left-align
|
||||
this._container.appendChild(this._canvas);
|
||||
},
|
||||
_compareTiles: function(prevBest, tile) {
|
||||
if (!prevBest) {
|
||||
return tile;
|
||||
|
Loading…
Reference in New Issue
Block a user