aboutsummaryrefslogtreecommitdiff
path: root/js/panels
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels')
-rwxr-xr-xjs/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js4
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js62
-rw-r--r--js/panels/Timeline/Layer.reel/css/Layer.css50
-rw-r--r--js/panels/Timeline/Layer.reel/scss/Layer.scss9
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js139
-rw-r--r--js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js2
6 files changed, 167 insertions, 99 deletions
diff --git a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js
index 0c950ffd..ecf0f9cd 100755
--- a/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js
+++ b/js/panels/CSSPanel/CSSPanelBase.reel/CSSPanelBase.js
@@ -1691,7 +1691,7 @@ NJCSSStyle.prototype.styleChange = function() {
1691NJCSSStyle.prototype.getUnits = function(val) { 1691NJCSSStyle.prototype.getUnits = function(val) {
1692 if(val.split(/\s/).length > 1) { 1692 if(val.split(/\s/).length > 1) {
1693 return false; 1693 return false;
1694 } else if(/px|em|pt|in|cm|mm|ex|pc|%/.test(val)) { 1694 } else if(/(px|em|pt|in|cm|mm|ex|pc|%)$/.test(val)) {
1695 return val.replace(/^.*(px|em|pt|in|cm|mm|ex|pc|%).*/, '$1'); 1695 return val.replace(/^.*(px|em|pt|in|cm|mm|ex|pc|%).*/, '$1');
1696 } 1696 }
1697 return null; 1697 return null;
@@ -1771,7 +1771,7 @@ NJCSSStyle.prototype.updateValue = function(newValue, bypassUndo) {
1771 this.styleChange(); 1771 this.styleChange();
1772 return true; 1772 return true;
1773 } 1773 }
1774 1774
1775 var IMPORTANT_FLAG = ' !important', 1775 var IMPORTANT_FLAG = ' !important',
1776 dec = this.njRule.declaration, 1776 dec = this.njRule.declaration,
1777 acceptAsValid = false, 1777 acceptAsValid = false,
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js
index 300462ee..679b88f3 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -67,10 +67,7 @@ var Layer = exports.Layer = Montage.create(Component, {
67 67
68 /* Layer models: the name, ID, and selected and animation booleans for the layer */ 68 /* Layer models: the name, ID, and selected and animation booleans for the layer */
69 _layerName:{ 69 _layerName:{
70 serializable: true, 70 value: "Default Layer Name"
71 value:null,
72 writable:true,
73 enumerable:true
74 }, 71 },
75 72
76 layerName:{ 73 layerName:{
@@ -79,20 +76,17 @@ var Layer = exports.Layer = Montage.create(Component, {
79 return this._layerName; 76 return this._layerName;
80 }, 77 },
81 set:function(newVal){ 78 set:function(newVal){
82 if (newVal !== this._layerName) { 79
83 this._layerEditable.value = newVal; 80 this._layerEditable.value = newVal;
84 this._layerName = newVal; 81 this._layerName = newVal;
85 this.layerData.layerName = newVal; 82 this.layerData.layerName = newVal;
86 this.log('layerName setter: ' + newVal) 83 if (typeof(this.dynamicLayerName) !== "undefined") {
87 } 84 this.dynamicLayerName.value = newVal;
88 85 }
89 } 86 }
90 }, 87 },
91 _layerID:{ 88 _layerID:{
92 value:null, 89 value: "Default Layer ID"
93 writable:true,
94 serializable: true,
95 enumerable:true
96 }, 90 },
97 91
98 layerID:{ 92 layerID:{
@@ -385,7 +379,7 @@ var Layer = exports.Layer = Montage.create(Component, {
385 return this._bypassAnimation; 379 return this._bypassAnimation;
386 }, 380 },
387 set: function(newVal) { 381 set: function(newVal) {
388 if (newVal !== this._bypassAnimation) { 382 if ((newVal !== this._bypassAnimation) && (typeof(this.layerData) !== "undefined")) {
389 this._bypassAnimation = newVal; 383 this._bypassAnimation = newVal;
390 this.layerData.bypassAnimation = newVal; 384 this.layerData.bypassAnimation = newVal;
391 } 385 }
@@ -410,16 +404,25 @@ var Layer = exports.Layer = Montage.create(Component, {
410 set:function(val){ 404 set:function(val){
411 this._layerData = val; 405 this._layerData = val;
412 if(this._layerData){ 406 if(this._layerData){
413 this.setData(); 407 this.setData(true);
414 } 408 }
415 } 409 }
416 }, 410 },
417 411
418 setData:{ 412 setData:{
419 value:function(){ 413 value:function(boolNeedsDraw){
420 if (typeof(this.layerData) === "undefined") { 414 if (typeof(this._layerData) === "undefined") {
415 return;
416 }
417
418 if (typeof(this._layerData.layerName) === "undefined") {
421 return; 419 return;
422 } 420 }
421
422 if (typeof(boolNeedsDraw) === "undefined") {
423 boolNeedsDraw = false;
424 }
425
423 this.layerName = this.layerData.layerName; 426 this.layerName = this.layerData.layerName;
424 this.layerID = this.layerData.layerID; 427 this.layerID = this.layerData.layerID;
425 this.arrLayerStyles = this.layerData.arrLayerStyles; 428 this.arrLayerStyles = this.layerData.arrLayerStyles;
@@ -438,7 +441,7 @@ var Layer = exports.Layer = Montage.create(Component, {
438 this.dtextScaleY = this.layerData.dtextScaleY; 441 this.dtextScaleY = this.layerData.dtextScaleY;
439 this.dtextRotate = this.layerData.dtextRotate; 442 this.dtextRotate = this.layerData.dtextRotate;
440 this._isFirstDraw = this.layerData._isFirstDraw; 443 this._isFirstDraw = this.layerData._isFirstDraw;
441 this.needsDraw = true; 444 this.needsDraw = boolNeedsDraw;
442 } 445 }
443 }, 446 },
444 447
@@ -455,7 +458,7 @@ var Layer = exports.Layer = Montage.create(Component, {
455 set: function(newVal) { 458 set: function(newVal) {
456 if (newVal !== this._bindingPoint) { 459 if (newVal !== this._bindingPoint) {
457 this._bindingPoint = newVal; 460 this._bindingPoint = newVal;
458 this.setData(); 461 this.setData(true);
459 } 462 }
460 } 463 }
461 }, 464 },
@@ -478,8 +481,6 @@ var Layer = exports.Layer = Montage.create(Component, {
478 // Initialize myself 481 // Initialize myself
479 this.init(); 482 this.init();
480 483
481 var that = this;
482
483 // Make it editable! 484 // Make it editable!
484 this._layerEditable = Hintable.create(); 485 this._layerEditable = Hintable.create();
485 this._layerEditable.element = this.titleSelector; 486 this._layerEditable.element = this.titleSelector;
@@ -495,7 +496,7 @@ var Layer = exports.Layer = Montage.create(Component, {
495 }, false); 496 }, false);
496 this._layerEditable.editingClass = "editable2"; 497 this._layerEditable.editingClass = "editable2";
497 this._layerEditable.value = this.layerName; 498 this._layerEditable.value = this.layerName;
498 this._layerEditable.needsDraw = true; 499 //this._layerEditable.needsDraw = true;
499 500
500 this.mainCollapser.clicker.addEventListener("click", this.handleMainCollapserClick.bind(this), false); 501 this.mainCollapser.clicker.addEventListener("click", this.handleMainCollapserClick.bind(this), false);
501 this.positionCollapser.clicker.addEventListener("click", this.handlePositionCollapserClick.bind(this), false); 502 this.positionCollapser.clicker.addEventListener("click", this.handlePositionCollapserClick.bind(this), false);
@@ -511,7 +512,7 @@ var Layer = exports.Layer = Montage.create(Component, {
511 this.element.addEventListener("mousedown", this, false); 512 this.element.addEventListener("mousedown", this, false);
512 this.element.addEventListener("click", this, false); 513 this.element.addEventListener("click", this, false);
513 514
514 // Drag and drop event hanlders 515 // Drag and drop event handlers
515 this.element.addEventListener("mouseover", this.handleMouseover.bind(this), false); 516 this.element.addEventListener("mouseover", this.handleMouseover.bind(this), false);
516 this.element.addEventListener("mouseout", this.handleMouseout.bind(this), false); 517 this.element.addEventListener("mouseout", this.handleMouseout.bind(this), false);
517 this.element.addEventListener("dragover", this.handleDragover.bind(this), false); 518 this.element.addEventListener("dragover", this.handleDragover.bind(this), false);
@@ -713,10 +714,6 @@ var Layer = exports.Layer = Montage.create(Component, {
713 this.deleteStyle(); 714 this.deleteStyle();
714 } 715 }
715 }, 716 },
716 handleSelectorEditableClick: {
717 value: function(event) {
718 }
719 },
720 handleSelectorEditableBlur : { 717 handleSelectorEditableBlur : {
721 value: function(event) { 718 value: function(event) {
722 this.titleSelector.scrollLeft = 0; 719 this.titleSelector.scrollLeft = 0;
@@ -724,7 +721,12 @@ var Layer = exports.Layer = Montage.create(Component, {
724 }, 721 },
725 handleSelectorEditableChange: { 722 handleSelectorEditableChange: {
726 value: function(event) { 723 value: function(event) {
727 this.layerName = this.dynamicLayerName.value; 724 var newVal = "ONTD";
725 if (this._layerEditable.value !== "") {
726 newVal = this._layerEditable.value;
727 }
728 this.dynamicLayerName.value = newVal;
729 this.layerName = newVal;
728 this.needsDraw = true; 730 this.needsDraw = true;
729 } 731 }
730 }, 732 },
diff --git a/js/panels/Timeline/Layer.reel/css/Layer.css b/js/panels/Timeline/Layer.reel/css/Layer.css
index 8e36c2db..1aae8d67 100644
--- a/js/panels/Timeline/Layer.reel/css/Layer.css
+++ b/js/panels/Timeline/Layer.reel/css/Layer.css
@@ -139,7 +139,12 @@
139 font-size: 11px; 139 font-size: 11px;
140} 140}
141 141
142/* line 130, ../scss/Layer.scss */ 142/* line 132, ../scss/Layer.scss */
143.label-layer .collapsible-label br {
144 display: none;