diff options
Diffstat (limited to 'js/panels/Timeline/Layer.reel')
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 418d2226..4a737490 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js | |||
@@ -133,6 +133,20 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
133 | } | 133 | } |
134 | }, | 134 | }, |
135 | 135 | ||
136 | _stageElement: { | ||
137 | value: null | ||
138 | }, | ||
139 | |||
140 | stageElement: { | ||
141 | get: function() { | ||
142 | return this._stageElement; | ||
143 | }, | ||
144 | set: function(newVal) { | ||
145 | this._stageElement = newVal; | ||
146 | this.layerData.stageElement = newVal; | ||
147 | } | ||
148 | }, | ||
149 | |||
136 | 150 | ||
137 | _elementsList : { | 151 | _elementsList : { |
138 | value: [] | 152 | value: [] |
@@ -398,6 +412,7 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
398 | 412 | ||
399 | this.layerName = this.layerData.layerName; | 413 | this.layerName = this.layerData.layerName; |
400 | this.layerID = this.layerData.layerID; | 414 | this.layerID = this.layerData.layerID; |
415 | this.stageElement = this.layerData.stageElement | ||
401 | this.arrLayerStyles = this.layerData.arrLayerStyles; | 416 | this.arrLayerStyles = this.layerData.arrLayerStyles; |
402 | this.isMainCollapsed = this.layerData.isMainCollapsed; | 417 | this.isMainCollapsed = this.layerData.isMainCollapsed; |
403 | this.isPositionCollapsed = this.layerData.isPositionCollapsed; | 418 | this.isPositionCollapsed = this.layerData.isPositionCollapsed; |
@@ -678,7 +693,7 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
678 | this.dynamicLayerName.value = this._layerEditable.value; | 693 | this.dynamicLayerName.value = this._layerEditable.value; |
679 | this.needsDraw = true; | 694 | this.needsDraw = true; |
680 | this.application.ninja.documentController.activeDocument.needsSave = true; | 695 | this.application.ninja.documentController.activeDocument.needsSave = true; |
681 | this.layerData.elementsList[0].setAttribute("id",this.dynamicLayerName.value); | 696 | this.layerData.stageElement.setAttribute("id",this.dynamicLayerName.value); |
682 | } | 697 | } |
683 | }, | 698 | }, |
684 | handleAddStyleClick: { | 699 | handleAddStyleClick: { |
@@ -790,7 +805,7 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
790 | }, | 805 | }, |
791 | handleDragstart: { | 806 | handleDragstart: { |
792 | value: function(event) { | 807 | value: function(event) { |
793 | this.parentComponent.parentComponent.dragLayerID = this.layerID; | 808 | //this.parentComponent.parentComponent.dragLayerID = this.layerID; |
794 | event.dataTransfer.setData('Text', 'Layer'); | 809 | event.dataTransfer.setData('Text', 'Layer'); |
795 | this.parentComponent.parentComponent.draggingType = "layer"; | 810 | this.parentComponent.parentComponent.draggingType = "layer"; |
796 | } | 811 | } |