removed _init anti-pattern from drawer constructor

This commit is contained in:
thatcher 2011-12-13 18:01:43 -05:00
parent c35ee2bca9
commit 9b5cf799bf

View File

@ -50,18 +50,16 @@ $.Drawer = function(source, viewport, elmt) {
this.elmt = this._container; 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 = { $.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) { _compareTiles: function(prevBest, tile) {
if (!prevBest) { if (!prevBest) {
return tile; return tile;