diff options
-rw-r--r-- | js/components/editable.reel/editable.js | 7 | ||||
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 7 | ||||
-rw-r--r-- | js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | 6 |
3 files changed, 17 insertions, 3 deletions
diff --git a/js/components/editable.reel/editable.js b/js/components/editable.reel/editable.js index 7a31e7fd..ca65bc2a 100644 --- a/js/components/editable.reel/editable.js +++ b/js/components/editable.reel/editable.js | |||
@@ -115,6 +115,9 @@ exports.Editable = Montage.create(Component, { | |||
115 | ///// Save the preEditValue | 115 | ///// Save the preEditValue |
116 | this._preEditValue = this.value; | 116 | this._preEditValue = this.value; |
117 | 117 | ||
118 | // Initialize enteredValue with current value | ||
119 | this.enteredValue = this.value; | ||
120 | |||
118 | if(this.selectOnStart) { | 121 | if(this.selectOnStart) { |
119 | this.selectAll(); | 122 | this.selectAll(); |
120 | } | 123 | } |
@@ -189,6 +192,10 @@ exports.Editable = Montage.create(Component, { | |||
189 | handleKeydown : { | 192 | handleKeydown : { |
190 | value : function(e) { | 193 | value : function(e) { |
191 | var k = e.keyCode; | 194 | var k = e.keyCode; |
195 | |||
196 | // Record change | ||
197 | this.enteredValue = this._element.firstChild.data; | ||
198 | |||
192 | //console.log('keyCode: ' + k); | 199 | //console.log('keyCode: ' + k); |
193 | } | 200 | } |
194 | }, | 201 | }, |
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 3bcc1401..f9edfca6 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js | |||
@@ -710,13 +710,14 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
710 | handleSelectorEditableBlur : { | 710 | handleSelectorEditableBlur : { |
711 | value: function(event) { | 711 | value: function(event) { |
712 | this.titleSelector.scrollLeft = 0; | 712 | this.titleSelector.scrollLeft = 0; |
713 | this.handleSelectorEditableChange(event); | ||
713 | } | 714 | } |
714 | }, | 715 | }, |
715 | handleSelectorEditableChange: { | 716 | handleSelectorEditableChange: { |
716 | value: function(event) { | 717 | value: function(event) { |
717 | var newVal = "ONTD"; | 718 | var newVal = this._layerEditable.enteredValue; |
718 | if (this._layerEditable.value !== "") { | 719 | if (this._layerEditable.enteredValue.length === 0) { |
719 | newVal = this._layerEditable.value; | 720 | newVal = this._layerEditable._preEditValue; |
720 | } | 721 | } |
721 | this.dynamicLayerName.value = newVal; | 722 | this.dynamicLayerName.value = newVal; |
722 | this.layerName = newVal; | 723 | this.layerName = newVal; |
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js index 20e217e9..8fec1d7d 100644 --- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js +++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js | |||
@@ -363,6 +363,8 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
363 | draw: { | 363 | draw: { |
364 | value: function() { | 364 | value: function() { |
365 | 365 | ||
366 | |||
367 | |||
366 | // Drag and Drop: | 368 | // Drag and Drop: |
367 | // Do we have a helper to append? | 369 | // Do we have a helper to append? |
368 | if (this._appendHelper === true) { | 370 | if (this._appendHelper === true) { |
@@ -664,6 +666,7 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
664 | value:function () { | 666 | value:function () { |
665 | this.user_layers.scrollTop = this.layout_tracks.scrollTop; | 667 | this.user_layers.scrollTop = this.layout_tracks.scrollTop; |
666 | this.layout_markers.scrollLeft = this.layout_tracks.scrollLeft; | 668 | this.layout_markers.scrollLeft = this.layout_tracks.scrollLeft; |
669 | this.playheadmarker.style.top = this.layout_tracks.scrollTop + "px"; | ||
667 | } | 670 | } |
668 | }, | 671 | }, |
669 | 672 | ||
@@ -684,6 +687,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, { | |||
684 | var clickedPosition = event.target.offsetLeft + event.offsetX; | 687 | var clickedPosition = event.target.offsetLeft + event.offsetX; |
685 | this.playhead.style.left = (clickedPosition - 2) + "px"; | 688 | this.playhead.style.left = (clickedPosition - 2) + "px"; |
686 | this.playheadmarker.style.left = clickedPosition + "px"; | 689 | this.playheadmarker.style.left = clickedPosition + "px"; |
690 | |||
691 | |||
692 | |||
687 | var currentMillisecPerPixel = Math.floor(this.millisecondsOffset / 80); | 693 | var currentMillisecPerPixel = Math.floor(this.millisecondsOffset / 80); |
688 | var currentMillisec = currentMillisecPerPixel * clickedPosition; | 694 | var currentMillisec = currentMillisecPerPixel * clickedPosition; |
689 | this.updateTimeText(currentMillisec); | 695 | this.updateTimeText(currentMillisec); |