From 9b5cf799bfaeb978c815b07532b9c4360a81acdb Mon Sep 17 00:00:00 2001 From: thatcher Date: Tue, 13 Dec 2011 18:01:43 -0500 Subject: [PATCH] removed _init anti-pattern from drawer constructor --- src/drawer.js | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/drawer.js b/src/drawer.js index 9e8ca131..52b975c9 100644 --- a/src/drawer.js +++ b/src/drawer.js @@ -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;