aboutsummaryrefslogtreecommitdiff
path: root/node_modules/montage/ui/flow.reel/flow.js
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/montage/ui/flow.reel/flow.js')
-rw-r--r--node_modules/montage/ui/flow.reel/flow.js44
1 files changed, 39 insertions, 5 deletions
diff --git a/node_modules/montage/ui/flow.reel/flow.js b/node_modules/montage/ui/flow.reel/flow.js
index 9fa9d8b1..74f05d88 100644
--- a/node_modules/montage/ui/flow.reel/flow.js
+++ b/node_modules/montage/ui/flow.reel/flow.js
@@ -10,6 +10,16 @@ var Montage = require("montage").Montage,
10 10
11var Flow = exports.Flow = Montage.create(Component, { 11var Flow = exports.Flow = Montage.create(Component, {
12 12
13 _repetition: {
14 serializable: true,
15 value: null
16 },
17
18 _translateComposer: {
19 serializable: true,
20 value: null
21 },
22
13 _splinePaths: { 23 _splinePaths: {
14 enumerable: false, 24 enumerable: false,
15 value: null 25 value: null
@@ -78,6 +88,7 @@ var Flow = exports.Flow = Montage.create(Component, {
78 }, 88 },
79 89
80 paths: { // TODO: listen for changes? 90 paths: { // TODO: listen for changes?
91 serializable: true,
81 get: function () { 92 get: function () {
82 return this._paths; 93 return this._paths;
83 }, 94 },
@@ -124,6 +135,7 @@ var Flow = exports.Flow = Montage.create(Component, {
124 }, 135 },
125 136
126 cameraPosition: { 137 cameraPosition: {
138 serializable: true,
127 get: function () { 139 get: function () {
128 return this._cameraPosition; 140 return this._cameraPosition;
129 }, 141 },
@@ -135,6 +147,7 @@ var Flow = exports.Flow = Montage.create(Component, {
135 }, 147 },
136 148
137 cameraTargetPoint: { 149 cameraTargetPoint: {
150 serializable: true,
138 get: function () { 151 get: function () {
139 return this._cameraTargetPoint; 152 return this._cameraTargetPoint;
140 }, 153 },
@@ -146,6 +159,7 @@ var Flow = exports.Flow = Montage.create(Component, {
146 }, 159 },
147 160
148 cameraFov: { 161 cameraFov: {
162 serializable: true,
149 get: function () { 163 get: function () {
150 return this._cameraFov; 164 return this._cameraFov;
151 }, 165 },
@@ -157,6 +171,7 @@ var Flow = exports.Flow = Montage.create(Component, {
157 }, 171 },
158 172
159 cameraRoll: { 173 cameraRoll: {
174 serializable: true,
160 get: function () { 175 get: function () {
161 return this._cameraRoll; 176 return this._cameraRoll;
162 }, 177 },
@@ -173,6 +188,7 @@ var Flow = exports.Flow = Montage.create(Component, {
173 }, 188 },
174 189
175 stride: { 190 stride: {
191 serializable: true,
176 get: function () { 192 get: function () {
177 return this._stride; 193 return this._stride;
178 }, 194 },
@@ -195,6 +211,7 @@ var Flow = exports.Flow = Montage.create(Component, {
195 }, 211 },
196 212
197 scrollingTransitionDuration: { // TODO: think about using the Date Converter 213 scrollingTransitionDuration: { // TODO: think about using the Date Converter
214 serializable: true,
198 get: function () { 215 get: function () {
199 return this._scrollingTransitionDuration; 216 return this._scrollingTransitionDuration;
200 }, 217 },
@@ -231,12 +248,12 @@ var Flow = exports.Flow = Montage.create(Component, {
231 }, 248 },
232 249
233 hasSelectedIndexScrolling: { 250 hasSelectedIndexScrolling: {
234 enumerable: false, 251 serializable: true,
235 value: false 252 value: false
236 }, 253 },
237 254
238 selectedIndexScrollingOffset: { 255 selectedIndexScrollingOffset: {
239 enumerable: false, 256 serializable: true,
240 value: 0 257 value: 0
241 }, 258 },
242 259
@@ -261,6 +278,7 @@ var Flow = exports.Flow = Montage.create(Component, {
261 }, 278 },
262 279
263 scrollingTransitionTimingFunction: { 280 scrollingTransitionTimingFunction: {
281 serializable: true,
264 get: function () { 282 get: function () {
265 return this._scrollingTransitionTimingFunction; 283 return this._scrollingTransitionTimingFunction;
266 }, 284 },
@@ -387,6 +405,7 @@ var Flow = exports.Flow = Montage.create(Component, {
387 }, 405 },
388 406
389 elementsBoundingSphereRadius: { 407 elementsBoundingSphereRadius: {
408 serializable: true,
390 get: function () { 409 get: function () {
391 return this._elementsBoundingSphereRadius; 410 return this._elementsBoundingSphereRadius;
392 }, 411 },
@@ -875,6 +894,7 @@ var Flow = exports.Flow = Montage.create(Component, {
875 }, 894 },
876 895
877 selectedIndexes: { 896 selectedIndexes: {
897 serializable: true,
878 get: function () { 898 get: function () {
879 if (this._repetition) { 899 if (this._repetition) {
880 return this._repetition.selectedIndexes; 900 return this._repetition.selectedIndexes;
@@ -897,6 +917,7 @@ var Flow = exports.Flow = Montage.create(Component, {
897 }, 917 },
898 918
899 activeIndexes: { 919 activeIndexes: {
920 serializable: true,
900 get: function () { 921 get: function () {
901 if (this._repetition) { 922 if (this._repetition) {
902 return this._repetition.activeIndexes; 923 return this._repetition.activeIndexes;
@@ -938,6 +959,7 @@ var Flow = exports.Flow = Montage.create(Component, {
938 } 959 }
939 this.length = maxLength; 960 this.length = maxLength;
940 } 961 }
962 this.needsDraw = true;
941 } 963 }
942 } 964 }
943 }, 965 },
@@ -966,6 +988,7 @@ var Flow = exports.Flow = Montage.create(Component, {
966 }, 988 },
967 989
968 objects: { 990 objects: {
991 serializable: true,
969 get: function() { 992 get: function() {
970 if (this._repetition) { 993 if (this._repetition) {
971 return this._repetition.objects; 994 return this._repetition.objects;
@@ -989,6 +1012,7 @@ var Flow = exports.Flow = Montage.create(Component, {
989 }, 1012 },
990 1013
991 contentController: { 1014 contentController: {
1015 serializable: true,
992 get: function() { 1016 get: function() {
993 if (this._repetition) { 1017 if (this._repetition) {
994 return this._repetition.contentController; 1018 return this._repetition.contentController;
@@ -1011,6 +1035,7 @@ var Flow = exports.Flow = Montage.create(Component, {
1011 }, 1035 },
1012 1036
1013 isSelectionEnabled: { 1037 isSelectionEnabled: {
1038 serializable: true,
1014 get: function() { 1039 get: function() {
1015 if (this._repetition) { 1040 if (this._repetition) {
1016 return this._repetition.isSelectionEnabled; 1041 return this._repetition.isSelectionEnabled;
@@ -1054,7 +1079,8 @@ var Flow = exports.Flow = Montage.create(Component, {
1054 var orphanedFragment, 1079 var orphanedFragment,
1055 currentContentRange = this.element.ownerDocument.createRange(), 1080 currentContentRange = this.element.ownerDocument.createRange(),
1056 wrapper, 1081 wrapper,
1057 self = this; 1082 self = this,
1083 oldWillDraw = this._repetition.willDraw;
1058 1084
1059 currentContentRange.selectNodeContents(this.element); 1085 currentContentRange.selectNodeContents(this.element);
1060 orphanedFragment = currentContentRange.extractContents(); 1086 orphanedFragment = currentContentRange.extractContents();
@@ -1062,7 +1088,6 @@ var Flow = exports.Flow = Montage.create(Component, {
1062 wrapper.appendChild(orphanedFragment); 1088 wrapper.appendChild(orphanedFragment);
1063 this._repetition.indexMapEnabled = true; 1089 this._repetition.indexMapEnabled = true;
1064 this._repetition.childComponents = this._orphanedChildren; 1090 this._repetition.childComponents = this._orphanedChildren;
1065 this._repetition.needsDraw = true;
1066 if (this._objectsForRepetition !== null) { 1091 if (this._objectsForRepetition !== null) {
1067 this._repetition.objects = this._objectsForRepetition; 1092 this._repetition.objects = this._objectsForRepetition;
1068 this._objectsForRepetition = null; 1093 this._objectsForRepetition = null;
@@ -1083,7 +1108,12 @@ var Flow = exports.Flow = Montage.create(Component, {
1083 this._repetition.activeIndexes = this._activeIndexesForRepetition; 1108 this._repetition.activeIndexes = this._activeIndexesForRepetition;
1084 this._activeIndexesForRepetition = null; 1109 this._activeIndexesForRepetition = null;
1085 } 1110 }
1086 1111 this._repetition.willDraw = function () {
1112 if (oldWillDraw) {
1113 oldWillDraw.apply(self._repetition, arguments);
1114 }