Skip to content
Permalink
Browse files

always nullify all properties keys (before preCoputing, since in get …

…we check for null, an not undefined)
  • Loading branch information...
RStankov committed Feb 17, 2010
1 parent b8e0870 commit 18bf4c8fef1cfe1d475068e610e8785ed6785f49
Showing with 6 additions and 4 deletions.
  1. +6 −4 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);
}
},

0 comments on commit 18bf4c8

Please sign in to comment.
You can’t perform that action at this time.