diff options
author | Eric Guzman | 2012-06-19 01:20:36 -0700 |
---|---|---|
committer | Eric Guzman | 2012-06-19 01:20:36 -0700 |
commit | 2ef72cdf0e59fb3623a2c13251ac707522f3dc5a (patch) | |
tree | f69f4e3de7e4441311ef2b38770e0ce26067aac4 /node_modules/montage/ui/scroller.reel | |
parent | 5260d3dfd99d79924c4aaa3ab798e90c7d328d7d (diff) | |
parent | 1007cbf983ad0f2460a4122a492a96023fdb4439 (diff) | |
download | ninja-2ef72cdf0e59fb3623a2c13251ac707522f3dc5a.tar.gz |
Merge branch 'binding' of github.com:dhg637/ninja-internal into binding
Conflicts:
js/stage/binding-view.reel/binding-view.js
Diffstat (limited to 'node_modules/montage/ui/scroller.reel')
-rw-r--r-- | node_modules/montage/ui/scroller.reel/scroller.html | 12 | ||||
-rw-r--r-- | node_modules/montage/ui/scroller.reel/scroller.js | 32 |
2 files changed, 26 insertions, 18 deletions
diff --git a/node_modules/montage/ui/scroller.reel/scroller.html b/node_modules/montage/ui/scroller.reel/scroller.html index a0913331..0b525746 100644 --- a/node_modules/montage/ui/scroller.reel/scroller.html +++ b/node_modules/montage/ui/scroller.reel/scroller.html | |||
@@ -10,7 +10,7 @@ | |||
10 | <script type="text/montage-serialization">{ | 10 | <script type="text/montage-serialization">{ |
11 | 11 | ||
12 | "scrollbars": { | 12 | "scrollbars": { |
13 | "prototype": "montage/ui/scroll-bars.reel", | 13 | "prototype": "ui/scroll-bars.reel", |
14 | "properties": { | 14 | "properties": { |
15 | "element": { | 15 | "element": { |
16 | "#": "scrollbars" | 16 | "#": "scrollbars" |
@@ -18,7 +18,7 @@ | |||
18 | } | 18 | } |
19 | }, | 19 | }, |
20 | "translateComposer1": { | 20 | "translateComposer1": { |
21 | "prototype": "montage/ui/composer/translate-composer", | 21 | "prototype": "ui/composer/translate-composer", |
22 | "properties": { | 22 | "properties": { |
23 | "component": {"@": "owner"}, | 23 | "component": {"@": "owner"}, |
24 | "minTranslateX": 0, | 24 | "minTranslateX": 0, |
@@ -26,8 +26,8 @@ | |||
26 | "invertAxis": true | 26 | "invertAxis": true |
27 | }, | 27 | }, |
28 | "bindings": { | 28 | "bindings": { |
29 | "translateX": {"<<->": "@owner.scrollX"}, | 29 | "translateX": {"<->": "@owner.scrollX"}, |
30 | "translateY": {"<<->": "@owner.scrollY"}, | 30 | "translateY": {"<->": "@owner.scrollY"}, |
31 | "maxTranslateX": {"<-": "@owner._maxTranslateX"}, | 31 | "maxTranslateX": {"<-": "@owner._maxTranslateX"}, |
32 | "maxTranslateY": {"<-": "@owner._maxTranslateY"}, | 32 | "maxTranslateY": {"<-": "@owner._maxTranslateY"}, |
33 | "axis": {"<-": "@owner.axis"}, | 33 | "axis": {"<-": "@owner.axis"}, |
@@ -45,7 +45,7 @@ | |||
45 | ] | 45 | ] |
46 | }, | 46 | }, |
47 | "slot": { | 47 | "slot": { |
48 | "prototype": "montage/ui/slot.reel", | 48 | "prototype": "ui/slot.reel", |
49 | "properties": { | 49 | "properties": { |
50 | "element": {"#": "content"} | 50 | "element": {"#": "content"} |
51 | }, | 51 | }, |
@@ -54,7 +54,7 @@ | |||
54 | } | 54 | } |
55 | }, | 55 | }, |
56 | "owner": { | 56 | "owner": { |
57 | "prototype": "montage/ui/scroller.reel", | 57 | "prototype": "ui/scroller.reel", |
58 | "properties": { | 58 | "properties": { |
59 | "_content": { | 59 | "_content": { |
60 | "#": "content" | 60 | "#": "content" |
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 | } |