diff options
author | Armen Kesablyan | 2012-06-19 00:45:26 -0700 |
---|---|---|
committer | Armen Kesablyan | 2012-06-19 00:45:26 -0700 |
commit | c59eb371559a3061ce53223e249ca97daace5968 (patch) | |
tree | f9540e26c0f273d35f92010605da65dd85bbe70c /node_modules/montage/ui/component.js | |
parent | 0f040acabfb7a4bf3138debec5aff869487ceb11 (diff) | |
parent | 918a4f5870e972b6e4e301c3237e065a1ffd26f5 (diff) | |
download | ninja-c59eb371559a3061ce53223e249ca97daace5968.tar.gz |
Merge branch 'master' of github.com:Motorola-Mobility/ninja-internal
Diffstat (limited to 'node_modules/montage/ui/component.js')
-rwxr-xr-x | node_modules/montage/ui/component.js | 22 |
1 files changed, 15 insertions, 7 deletions
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 | |||
30 | @default null | 30 | @default null |
31 | */ | 31 | */ |
32 | delegate: { | 32 | delegate: { |
33 | enumerable: false, | 33 | serializable: "reference", |
34 | value: null | 34 | value: null |
35 | }, | 35 | }, |
36 | 36 | ||
@@ -538,11 +538,19 @@ var Component = exports.Component = Montage.create(Montage,/** @lends module:mon | |||
538 | * @function | 538 | * @function |
539 | */ | 539 | */ |
540 | cleanupDeletedComponentTree: { | 540 | cleanupDeletedComponentTree: { |
541 | value: function() { | 541 | value: function(deleteBindings) { |
542 | Object.deleteBindings(this); | 542 | // Deleting bindings in all cases was causing the symptoms expressed in gh-603 |
543 | // Until we have a more granular way we shouldn't do this, | ||
544 | // the deleteBindings parameter is a short term fix. | ||
545 | if (deleteBindings) { | ||
546 | Object.deleteBindings(this); | ||
547 | } | ||
543 | this.needsDraw = false; | 548 | this.needsDraw = false; |
544 | this.traverseComponentTree(function(component) { | 549 | this.traverseComponentTree(function(component) { |
545 | Object.deleteBindings(component); | 550 | // See above comment |
551 | if (deleteBindings) { | ||
552 | Object.deleteBindings(component); | ||
553 | } | ||
546 | component.needsDraw = false; | 554 | component.needsDraw = false; |
547 | }); | 555 | }); |
548 | } | 556 | } |
@@ -631,7 +639,7 @@ var Component = exports.Component = Montage.create(Montage,/** @lends module:mon | |||
631 | if (this._element) { | 639 | if (this._element) { |
632 | this.originalContent = Array.prototype.slice.call(this._element.childNodes, 0); | 640 | this.originalContent = Array.prototype.slice.call(this._element.childNodes, 0); |
633 | } | 641 | } |
634 | if (!("identifier" in this)) { | 642 | if (! this.hasOwnProperty("identifier")) { |
635 | this.identifier = Montage.getInfoForObject(this).label; | 643 | this.identifier = Montage.getInfoForObject(this).label; |
636 | } | 644 | } |
637 | } | 645 | } |
@@ -1772,7 +1780,7 @@ var rootComponent = Montage.create(Component, /** @lends module:montage/ui/compo | |||
1772 | enumerable: false, | 1780 | enumerable: false, |
1773 | value: 0 | 1781 | value: 0 |
1774 | }, | 1782 | }, |
1775 | 1783 | ||
1776 | drawTree: { | 1784 | drawTree: { |
1777 | value: function drawTree() { | 1785 | value: function drawTree() { |
1778 | if (this.requestedAnimationFrame === null) { // 0 is a valid requestedAnimationFrame value | 1786 | if (this.requestedAnimationFrame === null) { // 0 is a valid requestedAnimationFrame value |
@@ -1826,7 +1834,7 @@ var rootComponent = Montage.create(Component, /** @lends module:montage/ui/compo | |||
1826 | // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating | 1834 | // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating |
1827 | var currentDate = Date.now(), | 1835 | var currentDate = Date.now(), |
1828 | miliseconds = 17 - currentDate + this._previousDrawDate; | 1836 | miliseconds = 17 - currentDate + this._previousDrawDate; |
1829 | 1837 | ||
1830 | if (miliseconds < 0) { | 1838 | if (miliseconds < 0) { |
1831 | miliseconds = 0; | 1839 | miliseconds = 0; |
1832 | } | 1840 | } |