From 2e04af953463643791f6362bd8ef4c6ba190abfa Mon Sep 17 00:00:00 2001 From: Valerio Virgillito Date: Wed, 18 Apr 2012 13:48:51 -0700 Subject: Squashed commit of the following: commit 2054551bfb01a0f4ca2e138b9d724835462d45cd Merge: 765c2da 616a853 Author: Valerio Virgillito Date: Wed Apr 18 13:48:21 2012 -0700 Merge branch 'refs/heads/master' into integration commit 765c2da8e1aa03550caf42b2bd5f367555ad2843 Author: Valerio Virgillito Date: Tue Apr 17 15:29:41 2012 -0700 updating the picasa carousel Signed-off-by: Valerio Virgillito commit 9484f1c82b81e27edf2dc0a1bcc1fa3b12077406 Merge: d27f2df cacb4a2 Author: Valerio Virgillito Date: Tue Apr 17 15:03:50 2012 -0700 Merge branch 'refs/heads/master' into integration commit d27f2df4d846064444263d7832d213535962abe7 Author: Valerio Virgillito Date: Wed Apr 11 10:39:36 2012 -0700 integrating new picasa carousel component Signed-off-by: Valerio Virgillito commit 6f98384c9ecbc8abe55ccfe1fc25a0c7ce22c493 Author: Valerio Virgillito Date: Tue Apr 10 14:33:00 2012 -0700 fixed the text area case issue Text area was renamed from TextArea to Textarea Signed-off-by: Valerio Virgillito commit 1e83e26652266136802bc7af930379c1ecd631a6 Author: Valerio Virgillito Date: Mon Apr 9 22:10:45 2012 -0700 integrating montage v0.8 into ninja. Signed-off-by: Valerio Virgillito Signed-off-by: Valerio Virgillito --- node_modules/montage/ui/scroller.reel/scroller.js | 49 +++++------------------ 1 file changed, 9 insertions(+), 40 deletions(-) (limited to 'node_modules/montage/ui/scroller.reel/scroller.js') diff --git a/node_modules/montage/ui/scroller.reel/scroller.js b/node_modules/montage/ui/scroller.reel/scroller.js index b578807e..8c367cd1 100644 --- a/node_modules/montage/ui/scroller.reel/scroller.js +++ b/node_modules/montage/ui/scroller.reel/scroller.js @@ -5,8 +5,7 @@ */ var Montage = require("montage").Montage, - Component = require("ui/component").Component - TranslateComposer = require("ui/composer/translate-composer").TranslateComposer; + Component = require("ui/component").Component; exports.Scroller = Montage.create(Component, { @@ -116,40 +115,6 @@ exports.Scroller = Montage.create(Component, { } }, - _momentumDuration: { - enumerable: false, - value: 650 - }, - - momentumDuration: { - get: function () { - return this._momentumDuration; - }, - set: function (value) { - this._momentumDuration = isNaN(parseInt(value, 10)) ? 1 : parseInt(value, 10); - if (this._momentumDuration < 1) { - this._momentumDuration = 1; - } - } - }, - - _bouncingDuration: { - enumerable: false, - value: 750 - }, - - bouncingDuration: { - get: function () { - return this._bouncingDuration; - }, - set: function (value) { - this._bouncingDuration = isNaN(parseInt(value, 10)) ? 1 : parseInt(value, 10); - if (this._bouncingDuration < 1) { - this._bouncingDuration = 1; - } - } - }, - _content: { enumerable: false, value: null @@ -157,11 +122,15 @@ exports.Scroller = Montage.create(Component, { templateDidLoad: { value: function () { - var orphanedFragment, - currentContentRange = this.element.ownerDocument.createRange(); + var orphanedFragment = document.createDocumentFragment(), + children = this.element.childNodes; - currentContentRange.selectNodeContents(this.element); - orphanedFragment = currentContentRange.extractContents(); + + while (children.length > 0) { + // As the nodes are appended to item.fragment they are removed + // from item.element, so always use index 0. + orphanedFragment.appendChild(children[0]); + } this._content.appendChild(orphanedFragment); } }, -- cgit v1.2.3