diff options
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
-rw-r--r-- | js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | 993 |
1 files changed, 417 insertions, 576 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index fc9f9cf3..f3ab0d84 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |||
@@ -36,27 +36,26 @@ var defaultEventManager = require("montage/core/event/event-manager").defaultEve | |||
36 | 36 | ||
37 | var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | 37 | var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { |
38 | 38 | ||
39 | // ==== Begin Models | ||
39 | _trackID:{ | 40 | _trackID:{ |
40 | value:null | 41 | value:null |
41 | }, | 42 | }, |
42 | |||
43 | trackID:{ | 43 | trackID:{ |
44 | serializable:true, | 44 | serializable:true, |
45 | get:function () { | 45 | get:function () { |
46 | return this._trackID; | 46 | return this._trackID; |
47 | }, | 47 | }, |
48 | set:function (value) { | 48 | set:function (value) { |
49 | if (value !== this._trackID) { | 49 | if (value !== this._trackID) { |
50 | this._trackID = value; | 50 | this._trackID = value; |
51 | this.trackData.layerID = value; | 51 | this.trackData.layerID = value; |
52 | } | 52 | } |
53 | } | 53 | } |
54 | }, | 54 | }, |
55 | 55 | ||
56 | _tween:{ | 56 | _tween:{ |
57 | value:[] | 57 | value:[] |
58 | }, | 58 | }, |
59 | |||
60 | tween:{ | 59 | tween:{ |
61 | serializable:true, | 60 | serializable:true, |
62 | get:function () { | 61 | get:function () { |
@@ -70,48 +69,61 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
70 | positionPropertyTrack:{ | 69 | positionPropertyTrack:{ |
71 | value:null | 70 | value:null |
72 | }, | 71 | }, |
73 | 72 | ||
74 | _isFirstDraw: { | 73 | _isFirstDraw: { |
75 | value: true | 74 | value: true |
76 | }, | 75 | }, |
77 | 76 | ||
78 | _isVisible:{ | 77 | _isVisible:{ |
79 | value: true | 78 | value: true |
80 | }, | 79 | }, |
81 | |||
82 | isVisible:{ | 80 | isVisible:{ |
83 | get:function(){ | 81 | get:function(){ |
84 | return this._isVisible; | 82 | return this._isVisible; |
85 | }, | 83 | }, |
86 | set:function(value){ | 84 | set:function(value){ |
87 | if (this._isVisible !== value) { | 85 | if (this._isVisible !== value) { |
88 | this._isVisible = value; | 86 | this._isVisible = value; |
89 | if (this.element !== null) { | 87 | if (this.element !== null) { |
90 | if (value === true) { | 88 | if (value === true) { |
91 | this.element.classList.remove("layer-hidden"); | 89 | this.element.classList.remove("layer-hidden"); |
92 | } else { | 90 | } else { |
93 | this.element.classList.add("layer-hidden"); | 91 | this.element.classList.add("layer-hidden"); |
94 | } | 92 | } |
95 | } | 93 | } |
96 | } | 94 | } |
97 | this.trackData.isVisible = value; | 95 | this.trackData.isVisible = value; |
98 | } | 96 | } |
99 | }, | 97 | }, |
100 | 98 | ||
99 | _bindingPoint : { | ||
100 | value : {} | ||
101 | }, | ||
102 | bindingPoint: { | ||
103 | get: function() { | ||
104 | return this._bindingPoint; | ||
105 | }, | ||
106 | set: function(newVal) { | ||
107 | if (newVal !== this._bindingPoint) { | ||
108 | this._bindingPoint = newVal; | ||
109 | this.setData(); | ||
110 | } | ||
111 | } | ||
112 | }, | ||
113 | |||
101 | _stageElement: { | 114 | _stageElement: { |
102 | value: null | 115 | value: null |
103 | }, | 116 | }, |
104 | stageElement: { | 117 | stageElement: { |
105 | get: function() { | 118 | get: function() { |
106 | return this._stageElement; | 119 | return this._stageElement; |
107 | }, | 120 | }, |
108 | set: function(newVal) { | 121 | set: function(newVal) { |
109 | this._stageElement = newVal; | 122 | this._stageElement = newVal; |
110 | this.trackData.stageElement = newVal; | 123 | this.trackData.stageElement = newVal; |
111 | } | 124 | } |
112 | }, | 125 | }, |
113 | 126 | ||
114 | // Are the various collapsers collapsed or not | ||
115 | _isMainCollapsed:{ | 127 | _isMainCollapsed:{ |
116 | value: true | 128 | value: true |
117 | }, | 129 | }, |
@@ -124,18 +136,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
124 | this.trackData.isMainCollapsed = newVal; | 136 | this.trackData.isMainCollapsed = newVal; |
125 | } | 137 | } |
126 | }, | 138 | }, |
127 | _isTransformCollapsed:{ | 139 | |
128 | value:true | ||
129 | }, | ||
130 | isTransformCollapsed:{ | ||
131 | get:function () { | ||
132 | return this._isTransformCollapsed; | ||
133 | }, | ||
134 | set:function (newVal) { | ||
135 | this._isTransformCollapsed = newVal; | ||
136 | this.trackData.isTransformCollapsed = newVal; | ||
137 | } | ||
138 | }, | ||
139 | _isPositionCollapsed:{ | 140 | _isPositionCollapsed:{ |
140 | value:true | 141 | value:true |
141 | }, | 142 | }, |
@@ -148,6 +149,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
148 | this.trackData.isPositionCollapsed = newVal; | 149 | this.trackData.isPositionCollapsed = newVal; |
149 | } | 150 | } |
150 | }, | 151 | }, |
152 | |||
151 | _isStyleCollapsed:{ | 153 | _isStyleCollapsed:{ |
152 | value:true | 154 | value:true |
153 | }, | 155 | }, |
@@ -160,97 +162,82 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
160 | this.trackData.isStyleCollapsed = newVal; | 162 | this.trackData.isStyleCollapsed = newVal; |
161 | } | 163 | } |
162 | }, | 164 | }, |
165 | |||
163 | _bypassAnimation : { | 166 | _bypassAnimation : { |
164 | value: false | 167 | value: false |
165 | }, | 168 | }, |
166 | bypassAnimation : { | 169 | bypassAnimation : { |
167 | serializable: true, | 170 | serializable: true, |
168 | get: function() { | 171 | get: function() { |
169 | return this._bypassAnimation; | 172 | return this._bypassAnimation; |
170 | }, | 173 | }, |
171 | set: function(newVal) { | 174 | set: function(newVal) { |
172 | if (typeof(this.trackData) !== "undefined") { | 175 | if (typeof(this.trackData) !== "undefined") { |
173 | this._bypassAnimation = newVal; | 176 | this._bypassAnimation = newVal; |
174 | this.trackData.bypassAnimation = newVal; | 177 | this.trackData.bypassAnimation = newVal; |
175 | } | 178 | } |
176 | } | 179 | } |
177 | }, | 180 | }, |
178 | 181 | ||
179 | _arrStyleTracks : { | 182 | _arrStyleTracks : { |
180 | value: [] | 183 | value: [] |
181 | }, | 184 | }, |
182 | arrStyleTracks: { | 185 | arrStyleTracks: { |
183 | serializable:true, | 186 | serializable:true, |
184 | get: function() { | 187 | get: function() { |
185 | return this._arrStyleTracks; | 188 | return this._arrStyleTracks; |
186 | }, | 189 | }, |
187 | set: function(newVal) { | 190 | set: function(newVal) { |
188 | this._arrStyleTracks = newVal; | 191 | this._arrStyleTracks = newVal; |
189 | this.trackData.arrStyleTracks = newVal; | 192 | this.trackData.arrStyleTracks = newVal; |
190 | } | 193 | } |
191 | }, | 194 | }, |
195 | |||
192 | _styleTracksRepetition: { | 196 | _styleTracksRepetition: { |
193 | value: null | 197 | value: null |