From f7e4257745ccd44b8d24555f0ef787429d6e472c Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Tue, 5 Jun 2012 00:11:03 -0700 Subject: adding the latest v0.10 montage Signed-off-by: Valerio Virgillito --- node_modules/montage/ui/component.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) (limited to 'node_modules/montage/ui/component.js') diff --git a/node_modules/montage/ui/component.js b/node_modules/montage/ui/component.js index 8a8f5739..30119815 100755 --- a/node_modules/montage/ui/component.js +++ b/node_modules/montage/ui/component.js @@ -30,7 +30,7 @@ var Component = exports.Component = Montage.create(Montage,/** @lends module:mon @default null */ delegate: { - enumerable: false, + serializable: "reference", value: null }, @@ -538,11 +538,19 @@ var Component = exports.Component = Montage.create(Montage,/** @lends module:mon * @function */ cleanupDeletedComponentTree: { - value: function() { - Object.deleteBindings(this); + value: function(deleteBindings) { + // Deleting bindings in all cases was causing the symptoms expressed in gh-603 + // Until we have a more granular way we shouldn't do this, + // the deleteBindings parameter is a short term fix. + if (deleteBindings) { + Object.deleteBindings(this); + } this.needsDraw = false; this.traverseComponentTree(function(component) { - Object.deleteBindings(component); + // See above comment + if (deleteBindings) { + Object.deleteBindings(component); + } component.needsDraw = false; }); } @@ -631,7 +639,7 @@ var Component = exports.Component = Montage.create(Montage,/** @lends module:mon if (this._element) { this.originalContent = Array.prototype.slice.call(this._element.childNodes, 0); } - if (!("identifier" in this)) { + if (! this.hasOwnProperty("identifier")) { this.identifier = Montage.getInfoForObject(this).label; } } @@ -1772,7 +1780,7 @@ var rootComponent = Montage.create(Component, /** @lends module:montage/ui/compo enumerable: false, value: 0 }, - + drawTree: { value: function drawTree() { if (this.requestedAnimationFrame === null) { // 0 is a valid requestedAnimationFrame value @@ -1826,7 +1834,7 @@ var rootComponent = Montage.create(Component, /** @lends module:montage/ui/compo // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating var currentDate = Date.now(), miliseconds = 17 - currentDate + this._previousDrawDate; - + if (miliseconds < 0) { miliseconds = 0; } -- cgit v1.2.3