aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel
diff options
context:
space:
mode:
authorJonathan Duran2012-02-23 07:37:17 -0800
committerJonathan Duran2012-02-23 07:37:17 -0800
commitb7402018659cf8058d5646c08b2a916492269e33 (patch)
tree26ffeeaae45bbaaca9931e747e9532c1831c50fd /js/panels/Timeline/TimelinePanel.reel
parentcc295dd0fb873505eed01c232bd987cf6e2dcdd9 (diff)
downloadninja-b7402018659cf8058d5646c08b2a916492269e33.tar.gz
Timeline Reset to clean Master branch. Code scrub.
Fresh copy of ninja-internal/master with Timeline folder copied in to resolved merge issues. Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r--[-rwxr-xr-x]js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html49
-rw-r--r--[-rwxr-xr-x]js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js102
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/css/TimelinePanel.css23
3 files changed, 135 insertions, 39 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
index 29bf6eb3..2a84c21a 100755..100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.html
@@ -24,7 +24,8 @@
24 "trackRepetition" : {"@" : "repetition2"}, 24 "trackRepetition" : {"@" : "repetition2"},
25 "playhead": {"#": "playhead"}, 25 "playhead": {"#": "playhead"},
26 "playheadmarker": {"#": "playhead_marker"}, 26 "playheadmarker": {"#": "playhead_marker"},
27 "timetext" : {"#": "time_text"} 27 "timetext" : {"#": "time_text"},
28 "timebar" : {"#": "time_bar"}
28 } 29 }
29 }, 30 },
30 31
@@ -143,6 +144,36 @@
143 "boundObjectPropertyPath" : "objectAtCurrentIteration.tweens", 144 "boundObjectPropertyPath" : "objectAtCurrentIteration.tweens",
144 "oneway" : false 145 "oneway" : false
145 }, 146 },
147 "animatedElement" : {
148 "boundObject" : {"@" : "repetition2"},
149 "boundObjectPropertyPath" : "objectAtCurrentIteration.animatedElement",
150 "oneway" : false
151 },
152 "arrStyleTracks" : {
153 "boundObject" : {"@" : "repetition2"},
154 "boundObjectPropertyPath" : "objectAtCurrentIteration.arrStyleTracks",
155 "oneway" : false
156 },
157 "isTrackAnimated" : {
158 "boundObject" : {"@" : "repetition2"},
159 "boundObjectPropertyPath" : "objectAtCurrentIteration.isTrackAnimated",
160 "oneway" : false
161 },
162 "trackDuration" : {
163 "boundObject" : {"@" : "repetition2"},
164 "boundObjectPropertyPath" : "objectAtCurrentIteration.trackDuration",
165 "oneway" : false
166 },
167 "animationName" : {
168 "boundObject" : {"@" : "repetition2"},
169 "boundObjectPropertyPath" : "objectAtCurrentIteration.animationName",
170 "oneway" : false
171 },
172 "currentKeyframeRule" : {
173 "boundObject" : {"@" : "repetition2"},
174 "boundObjectPropertyPath" : "objectAtCurrentIteration.currentKeyframeRule",
175 "oneway" : false
176 },
146 "isMainCollapsed" : { 177 "isMainCollapsed" : {
147 "boundObject" : {"@" : "repetition2"}, 178 "boundObject" : {"@" : "repetition2"},
148 "boundObjectPropertyPath" : "objectAtCurrentIteration.isMainCollapsed", 179 "boundObjectPropertyPath" : "objectAtCurrentIteration.isMainCollapsed",
@@ -162,7 +193,12 @@
162 "boundObject" : {"@" : "repetition2"}, 193 "boundObject" : {"@" : "repetition2"},
163 "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed", 194 "boundObjectPropertyPath" : "objectAtCurrentIteration.isStyleCollapsed",
164 "oneway" : false 195 "oneway" : false
165 } 196 },
197 "trackPosition" : {
198 "boundObject" : {"@" : "repetition2"},
199 "boundObjectPropertyPath" : "objectAtCurrentIteration.trackPosition",
200 "oneway" : false
201 }
166 } 202 }
167 } 203 }
168 } 204 }
@@ -193,7 +229,9 @@
193 229
194 230
195 <div id="user_layers" class="userlayers"> 231 <div id="user_layers" class="userlayers">
196 <div id="master_layer" class="masterlayer">Master Layer</div> 232 <div id="master_layer" class="masterlayer">
233 <div>Master Layer</div>
234 </div>
197 <div id="container-layers"> 235 <div id="container-layers">
198 <div id="container-layer"></div> 236 <div id="container-layer"></div>
199 </div> 237 </div>
@@ -202,6 +240,7 @@
202 <div id="timeline_gutter" class="timelinegutter"> 240 <div id="timeline_gutter" class="timelinegutter">
203 <div id="newlayer_button" class="newlayerbutton"></div> 241 <div id="newlayer_button" class="newlayerbutton"></div>
204 <div id="deletelayer_button" class="deletelayerbutton"></div> 242 <div id="deletelayer_button" class="deletelayerbutton"></div>
243 <input id="end_hottext" class="endhottext hottext">
205 </div> 244 </div>
206 </div> 245 </div>
207 </div> 246 </div>
@@ -220,7 +259,9 @@
220 <div id="layer_tracks" class="tl_layertracks"> 259 <div id="layer_tracks" class="tl_layertracks">
221 <div class="layout-tracks"> 260 <div class="layout-tracks">
222 <div id="playhead_marker" class="playheadmarker"></div> 261 <div id="playhead_marker" class="playheadmarker"></div>
223 <div id="master_track" class="mastertrack"></div> 262 <div id="master_track" class="mastertrack">
263 <div id="time_bar" class="timebar"></div>
264 </div>
224 <div id="container-tracks" class="container-tracks"> 265 <div id="container-tracks" class="container-tracks">
225 <div id="container-track"></div> 266 <div id="container-track"></div>
226 </div> 267 </div>
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 07fee19d..43e758f4 100755..100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -65,6 +65,22 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
65 value:1000 65 value:1000
66 }, 66 },
67 67
68 _masterDuration:{
69 serializable: true,
70 value:0
71 },
72
73 masterDuration:{
74 serializable:true,
75 get:function(){
76 return this._masterDuration;
77 },
78 set:function(val){
79 this._masterDuration = val;
80 this.timebar.style.width = (this._masterDuration / 12) + "px";
81 }
82 },
83
68 _arrTracks:{ 84 _arrTracks:{
69 serializable:true, 85 serializable:true,
70 value:[] 86 value:[]
@@ -109,6 +125,20 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
109 } 125 }
110 }, 126 },
111 127
128 _selectedTweens:{
129 value:[]
130 },
131
132 selectedTweens:{
133 serializable:true,
134 get:function () {
135 return this._selectedTweens;
136 },
137 set:function (newVal) {
138 this._selectedTweens = newVal;
139 }
140 },
141
112 _isLayer:{ 142 _isLayer:{
113 value:false 143 value:false
114 }, 144 },
@@ -234,13 +264,13 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
234 } 264 }
235 }, 265 },
236 266
237 deselectKeyframes:{ 267 deselectTweens:{
238 value:function () { 268 value:function () {
239 for (var i = 0; i < this.selectedKeyframes.length; i++) { 269 for (var i = 0; i < this.selectedTweens.length; i++) {
240 this.selectedKeyframes[i].deselect(); 270 this.selectedTweens[i].deselectTween();
241 } 271 }
242 this.selectedKeyframes = null; 272 this.selectedTweens = null;
243 this.selectedKeyframes = new Array(); 273 this.selectedTweens = new Array();
244 } 274 }
245 }, 275 },
246 276
@@ -253,6 +283,14 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
253 283
254 handleDeleteLayerClick:{ 284 handleDeleteLayerClick:{
255 value:function (event) { 285 value:function (event) {
286 if (this.arrLayers.length === 1) {
287 // do not delete last layer
288 return;
289 }
290 if (this.layerRepetition.selectedIndexes === null) {
291 // nothing is selected, do not delete
292 return;
293 }
256 this._deleteKeyDown = false; 294 this._deleteKeyDown = false;
257 if (this.application.ninja.currentSelectedContainer.id === "UserContent") { 295 if (this.application.ninja.currentSelectedContainer.id === "UserContent") {