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/scroller.reel/scroller.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/scroller.reel/scroller.js')
-rw-r--r-- | node_modules/montage/ui/scroller.reel/scroller.js | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/node_modules/montage/ui/scroller.reel/scroller.js b/node_modules/montage/ui/scroller.reel/scroller.js index afb9c674..4661f60a 100644 --- a/node_modules/montage/ui/scroller.reel/scroller.js +++ b/node_modules/montage/ui/scroller.reel/scroller.js | |||
@@ -10,7 +10,6 @@ var Montage = require("montage").Montage, | |||
10 | exports.Scroller = Montage.create(Component, { | 10 | exports.Scroller = Montage.create(Component, { |
11 | 11 | ||
12 | _scrollX: { | 12 | _scrollX: { |
13 | enumerable: false, | ||
14 | value: 0 | 13 | value: 0 |
15 | }, | 14 | }, |
16 | 15 | ||
@@ -21,11 +20,11 @@ exports.Scroller = Montage.create(Component, { | |||
21 | set: function (value) { | 20 | set: function (value) { |
22 | this._scrollX = value; | 21 | this._scrollX = value; |
23 | this.needsDraw = true; | 22 | this.needsDraw = true; |
24 | } | 23 | }, |
24 | serializable: true | ||
25 | }, | 25 | }, |
26 | 26 | ||
27 | _scrollY: { | 27 | _scrollY: { |
28 | enumerable: false, | ||
29 | value: 0 | 28 | value: 0 |
30 | }, | 29 | }, |
31 | 30 | ||
@@ -36,7 +35,8 @@ exports.Scroller = Montage.create(Component, { | |||
36 | set: function (value) { | 35 | set: function (value) { |
37 | this._scrollY = value; | 36 | this._scrollY = value; |
38 | this.needsDraw = true; | 37 | this.needsDraw = true; |
39 | } | 38 | }, |
39 | serializable: true | ||
40 | }, | 40 | }, |
41 | 41 | ||
42 | _maxTranslateX: { | 42 | _maxTranslateX: { |
@@ -48,7 +48,6 @@ exports.Scroller = Montage.create(Component, { | |||
48 | }, | 48 | }, |
49 | 49 | ||
50 | _axis: { | 50 | _axis: { |
51 | enumerable: false, | ||
52 | value: "auto" | 51 | value: "auto" |
53 | }, | 52 | }, |
54 | 53 | ||
@@ -59,11 +58,11 @@ exports.Scroller = Montage.create(Component, { | |||
59 | set: function (value) { | 58 | set: function (value) { |
60 | this._axis = value; | 59 | this._axis = value; |
61 | this.needsDraw = true; | 60 | this.needsDraw = true; |
62 | } | 61 | }, |
62 | serializable: true | ||
63 | }, | 63 | }, |
64 | 64 | ||
65 | _displayScrollbars: { | 65 | _displayScrollbars: { |
66 | enumerable: false, | ||
67 | value: "auto" | 66 | value: "auto" |
68 | }, | 67 | }, |
69 | 68 | ||
@@ -84,11 +83,11 @@ exports.Scroller = Montage.create(Component, { | |||
84 | break; | 83 | break; |
85 | } | 84 | } |
86 | this.needsDraw = true; | 85 | this.needsDraw = true; |
87 | } | 86 | }, |
87 | serializable: true | ||
88 | }, | 88 | }, |
89 | 89 | ||
90 | _hasMomentum: { | 90 | _hasMomentum: { |
91 | enumerable: false, | ||
92 | value: true | 91 | value: true |
93 | }, | 92 | }, |
94 | 93 | ||
@@ -98,7 +97,18 @@ exports.Scroller = Montage.create(Component, { | |||
98 | }, | 97 | }, |
99 | set: function (value) { | 98 | set: function (value) { |
100 | this._hasMomentum = value; | 99 | this._hasMomentum = value; |
101 | } | 100 | }, |
101 | serializable: true | ||
102 | }, | ||
103 | |||
104 | _content: { | ||
105 | value: null, | ||
106 | serializable: true | ||
107 | }, | ||
108 | |||
109 | _scrollBars: { | ||
110 | value: null, | ||
111 | serializable: true | ||
102 | }, | 112 | }, |
103 | 113 | ||
104 | handleTranslateStart: { | 114 | handleTranslateStart: { |
@@ -121,7 +131,6 @@ exports.Scroller = Montage.create(Component, { | |||
121 | }, | 131 | }, |
122 | 132 | ||
123 | willDraw: { | 133 | willDraw: { |
124 | enumerable: false, | ||
125 | value: function () { | 134 | value: function () { |
126 | this._left = this._element.offsetLeft; | 135 | this._left = this._element.offsetLeft; |
127 | this._top = this._element.offsetTop; | 136 | this._top = this._element.offsetTop; |
@@ -187,7 +196,6 @@ exports.Scroller = Montage.create(Component, { | |||
187 | }, | 196 | }, |
188 | 197 | ||
189 | draw: { | 198 | draw: { |
190 | enumerable: false, | ||
191 | value: function () { | 199 | value: function () { |
192 | this._content.style.webkitTransform="translate3d("+(-this._scrollX)+"px, "+(-this._scrollY)+"px, 0)"; | 200 | this._content.style.webkitTransform="translate3d("+(-this._scrollX)+"px, "+(-this._scrollY)+"px, 0)"; |
193 | } | 201 | } |