Skip to content

Commit

Permalink
always nullify all properties keys (before preCoputing, since in get …
Browse files Browse the repository at this point in the history
…we check for null, an not undefined)
  • Loading branch information
RStankov committed Feb 17, 2010
1 parent b8e0870 commit 18bf4c8
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/dom/layout.js
Expand Up @@ -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.
Expand All @@ -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);
}
},

Expand Down

0 comments on commit 18bf4c8

Please sign in to comment.