aboutsummaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
Diffstat (limited to 'js')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.html2
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js12
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js47
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js2
4 files changed, 48 insertions, 15 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.html b/js/panels/Timeline/Layer.reel/Layer.html
index 0bd448f7..cba963b6 100644
--- a/js/panels/Timeline/Layer.reel/Layer.html
+++ b/js/panels/Timeline/Layer.reel/Layer.html
@@ -226,6 +226,8 @@
226 } 226 }
227 } 227 }
228 } 228 }
229
230
229 } 231 }
230 </script> 232 </script>
231 </head> 233 </head>
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index d50360e6..3e016c0c 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -418,7 +418,7 @@ var Layer = exports.Layer = Montage.create(Component, {
418 defaultEventManager.dispatchEvent(newEvent); 418 defaultEventManager.dispatchEvent(newEvent);
419 that.isMainCollapsed = that.mainCollapser.isCollapsed; 419 that.isMainCollapsed = that.mainCollapser.isCollapsed;
420 } 420 }
421 this.mainCollapser.needsDraw = true; 421 //this.mainCollapser.needsDraw = true;
422 422
423 this.positionCollapser.clicker = this.clickerPosition; 423 this.positionCollapser.clicker = this.clickerPosition;
424 this.positionCollapser.myContent = this.contentPosition; 424 this.positionCollapser.myContent = this.contentPosition;
@@ -437,7 +437,7 @@ var Layer = exports.Layer = Montage.create(Component, {
437 defaultEventManager.dispatchEvent(newEvent); 437 defaultEventManager.dispatchEvent(newEvent);
438 that.isPositionCollapsed = that.positionCollapser.isCollapsed; 438 that.isPositionCollapsed = that.positionCollapser.isCollapsed;
439 } 439 }
440 this.positionCollapser.needsDraw = true; 440 //this.positionCollapser.needsDraw = true;
441 441
442 this.transformCollapser.clicker = this.clickerTransform; 442 this.transformCollapser.clicker = this.clickerTransform;
443 this.transformCollapser.myContent = this.contentTransform; 443 this.transformCollapser.myContent = this.contentTransform;
@@ -456,13 +456,13 @@ var Layer = exports.Layer = Montage.create(Component, {
456 defaultEventManager.dispatchEvent(newEvent); 456 defaultEventManager.dispatchEvent(newEvent);
457 that.isTransformCollapsed = that.transformCollapser.isCollapsed; 457 that.isTransformCollapsed = that.transformCollapser.isCollapsed;
458 } 458 }
459 this.transformCollapser.needsDraw = true; 459 //this.transformCollapser.needsDraw = true;
460 460
461 this.styleCollapser.clicker = this.clickerStyle; 461 this.styleCollapser.clicker = this.clickerStyle;
462 this.styleCollapser.myContent = this.contentStyle; 462 this.styleCollapser.myContent = this.contentStyle;
463 this.styleCollapser.element = this.element; 463 this.styleCollapser.element = this.element;
464 this.styleCollapser.isCollapsed = this.isStyleCollapsed; 464 this.styleCollapser.isCollapsed = this.isStyleCollapsed;
465 this.styleCollapser.contentHeight = 20; 465 this.styleCollapser.contentHeight = 0;
466 this.styleCollapser.isAnimated = true; 466 this.styleCollapser.isAnimated = true;
467 this.styleCollapser.labelClickEvent = function(boolBypass) { 467 this.styleCollapser.labelClickEvent = function(boolBypass) {
468 var newEvent = document.createEvent("CustomEvent"); 468 var newEvent = document.createEvent("CustomEvent");
@@ -474,7 +474,7 @@ var Layer = exports.Layer = Montage.create(Component, {
474 defaultEventManager.dispatchEvent(newEvent); 474 defaultEventManager.dispatchEvent(newEvent);
475 that.isStyleCollapsed = that.styleCollapser.isCollapsed; 475 that.isStyleCollapsed = that.styleCollapser.isCollapsed;
476 } 476 }
477 this.styleCollapser.needsDraw = true; 477 //this.styleCollapser.needsDraw = true;
478 478
479 // Add event listeners to add and delete style buttons 479 // Add event listeners to add and delete style buttons
480 this.buttonAddStyle.identifier = "addStyle"; 480 this.buttonAddStyle.identifier = "addStyle";
@@ -485,7 +485,7 @@ var Layer = exports.Layer = Montage.create(Component, {
485 485
486 // Add mousedown listener to set isActive 486 // Add mousedown listener to set isActive
487 this.element.addEventListener("mousedown", this, false); 487 this.element.addEventListener("mousedown", this, false);
488 //this.element.addEventListener("click", this, false); 488 this.element.addEventListener("click", this, false);
489 489
490 } 490 }
491 }, 491 },
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index ec9555fe..59306705 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -47,9 +47,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
47 _cacheArrays : { 47 _cacheArrays : {
48 value: function() { 48 value: function() {
49 // Cache this.arrLayers and this.arrTracks. 49 // Cache this.arrLayers and this.arrTracks.
50 console.log('cacheArrays ' + this._boolCacheArrays) 50 this.log('cacheArrays ' + this._boolCacheArrays)
51 if (this._boolCacheArrays) { 51 if (this._boolCacheArrays) {
52 console.log('caching arrays for ', this.application.ninja.currentDocument.name); 52 this.log('caching arrays for ', this.application.ninja.currentDocument.name);
53 this.application.ninja.currentDocument.tlArrLayers = this.arrLayers; 53 this.application.ninja.currentDocument.tlArrLayers = this.arrLayers;
54 this.application.ninja.currentDocument.tlArrTracks = this.arrTracks; 54 this.application.ninja.currentDocument.tlArrTracks = this.arrTracks;
55 } 55 }
@@ -264,7 +264,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
264 // Check to see if we have saved timeline information in the currentDocument. 264 // Check to see if we have saved timeline information in the currentDocument.
265 if (typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined") { 265 if (typeof(this.application.ninja.currentDocument.isTimelineInitialized) === "undefined") {
266 // No, we have no information stored. Create it. 266 // No, we have no information stored. Create it.
267 console.log('newfile ' + this.application.ninja.currentDocument.name) 267 this.log('newfile ' + this.application.ninja.currentDocument.name)
268 this.application.ninja.currentDocument.isTimelineInitialized = true; 268 this.application.ninja.currentDocument.isTimelineInitialized = true;
269 this.application.ninja.currentDocument.tlArrLayers = []; 269 this.application.ninja.currentDocument.tlArrLayers = [];
270 this.application.ninja.currentDocument.tlArrTracks = []; 270 this.application.ninja.currentDocument.tlArrTracks = [];
@@ -281,7 +281,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
281 this._openDoc=true; 281 this._openDoc=true;
282 NJevent('newLayer',{key:this._hashKey,ele:this.application.ninja.currentDocument.documentRoot.children[myIndex]}) 282 NJevent('newLayer',{key:this._hashKey,ele:this.application.ninja.currentDocument.documentRoot.children[myIndex]})
283 myIndex++; 283 myIndex++;
284 k } 284 }
285 } 285 }
286 else{ 286 else{
287 NJevent('newLayer', this._hashKey); 287 NJevent('newLayer', this._hashKey);
@@ -300,7 +300,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
300 300
301 } else { 301 } else {
302 // we do have information stored. Use it. 302 // we do have information stored. Use it.
303 console.log('oldfile ' + this.application.ninja.currentDocument.name) 303 this.log('oldfile ' + this.application.ninja.currentDocument.name)
304 this._boolCacheArrays = false; 304 this._boolCacheArrays = false;
305 this.arrLayers = []; 305 this.arrLayers = [];
306 this.arrTracks = []; 306 this.arrTracks = [];
@@ -469,7 +469,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
469 469
470 handleDeleteLayerClick:{ 470 handleDeleteLayerClick:{
471 value:function (event) { 471 value:function (event) {
472 console.log('handleDeleteLayerClick called') 472 this.log('handleDeleteLayerClick called')
473 if (this.arrLayers.length === 1) { 473 if (this.arrLayers.length === 1) {
474 // do not delete last layer 474 // do not delete last layer
475 return; 475 return;
@@ -795,7 +795,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
795 if(this.currentLayerSelected.elementsList[0]!==undefined){ 795 if(this.currentLayerSelected.elementsList[0]!==undefined){
796 if(this.currentTrackSelected.isTrackAnimated){ 796 if(this.currentTrackSelected.isTrackAnimated){
797 this.application.ninja.stage.clearDrawingCanvas(); 797 this.application.ninja.stage.clearDrawingCanvas();
798 console.log("cannot add elements to a layer with animated element"); 798 this.log("cannot add elements to a layer with animated element");
799 return; 799 return;
800 }else{ 800 }else{
801 this.hashElementMapToLayer.setItem(event.detail.uuid, event.detail,this.currentLayerSelected); 801 this.hashElementMapToLayer.setItem(event.detail.uuid, event.detail,this.currentLayerSelected);
@@ -1167,7 +1167,38 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1167 }); 1167 });
1168 return command; 1168 return command;
1169 } 1169 }
1170 } 1170 },
1171 /* === END: Controllers === */ 1171 /* === END: Controllers === */
1172
1173 /* === BEGIN: Logging routines === */
1174 _boolDebug: {
1175 enumerable: false,
1176 value: false // set to true to enable debugging to console; false for turning off all debugging.
1177 },
1178 boolDebug: {
1179 get: function() {
1180 return this._boolDebug;
1181 },
1182 set: function(boolDebugSwitch) {
1183 this._boolDebug = boolDebugSwitch;
1184 }
1185 },
1186 log: {
1187 value: function(strMessage) {
1188 if (this.boolDebug) {
1189 console.log(this.getLineNumber() + ": " + strMessage);
1190 }
1191 }
1192 },
1193 getLineNumber: {
1194 value: function() {
1195 try {
1196 throw new Error('bazinga')
1197 }catch(e){
1198 return e.stack.split("at")[3].split(":")[2];
1199 }
1200 }
1201 }
1202 /* === END: Logging routines === */
1172}); 1203});
1173 1204
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
index f8f4f6b8..90b685dc 100644
--- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
+++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
@@ -626,7 +626,7 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, {
626 this._styleCollapser = Collapser.create(); 626 this._styleCollapser = Collapser.create();
627 this._styleCollapser.clicker = this.lab