From 18bf4c8fef1cfe1d475068e610e8785ed6785f49 Mon Sep 17 00:00:00 2001 From: RStankov Date: Wed, 17 Feb 2010 21:33:14 +0200 Subject: [PATCH] always nullify all properties keys (before preCoputing, since in get we check for null, an not undefined) --- src/dom/layout.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/dom/layout.js b/src/dom/layout.js index 8bdaaf41c..d92520ed7 100644 --- a/src/dom/layout.js +++ b/src/dom/layout.js @@ -213,6 +213,12 @@ initialize: function($super, element, preCompute) { $super(); this.element = $(element); + + // nullify all properties keys + Element.Layout.PROPERTIES.each( function(property) { + this._set(property, null); + }, this); + // The 'preCompute' boolean tells us whether we should fetch all values // at once. If so, we should do setup/teardown only once. We set a flag // so that we can ignore calls to `_begin` and `_end` elsewhere. @@ -222,10 +228,6 @@ Element.Layout.PROPERTIES.each( this._compute, this ); this._end(); this._preComputing = false; - } else { - Element.Layout.PROPERTIES.each( function(property) { - this._set(property, null); - }, this); } },