diff options
Diffstat (limited to 'js/panels/Timeline/Layer.reel/Layer.js')
-rw-r--r-- | js/panels/Timeline/Layer.reel/Layer.js | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.js b/js/panels/Timeline/Layer.reel/Layer.js index 245aabd4..130dd044 100644 --- a/js/panels/Timeline/Layer.reel/Layer.js +++ b/js/panels/Timeline/Layer.reel/Layer.js | |||
@@ -777,6 +777,9 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
777 | }, | 777 | }, |
778 | handleDragleave: { | 778 | handleDragleave: { |
779 | value: function(event) { | 779 | value: function(event) { |
780 | if (this.parentComponent.parentComponent.draggingType !== "layer") { | ||
781 | return; | ||
782 | } | ||
780 | this.element.classList.remove("dragOver"); | 783 | this.element.classList.remove("dragOver"); |
781 | } | 784 | } |
782 | }, | 785 | }, |
@@ -784,10 +787,14 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
784 | value: function(event) { | 787 | value: function(event) { |
785 | this.parentComponent.parentComponent.dragLayerID = this.layerID; | 788 | this.parentComponent.parentComponent.dragLayerID = this.layerID; |
786 | event.dataTransfer.setData('Text', 'Layer'); | 789 | event.dataTransfer.setData('Text', 'Layer'); |
790 | this.parentComponent.parentComponent.draggingType = "layer"; | ||
787 | } | 791 | } |
788 | }, | 792 | }, |
789 | handleDragover: { | 793 | handleDragover: { |
790 | value: function(event) { | 794 | value: function(event) { |
795 | if (this.parentComponent.parentComponent.draggingType !== "layer") { | ||
796 | return; | ||
797 | } | ||
791 | event.preventDefault(); | 798 | event.preventDefault(); |
792 | this.element.classList.add("dragOver"); | 799 | this.element.classList.add("dragOver"); |
793 | event.dataTransfer.dropEffect = "move"; | 800 | event.dataTransfer.dropEffect = "move"; |
@@ -797,6 +804,9 @@ var Layer = exports.Layer = Montage.create(Component, { | |||
797 | 804 | ||
798 | handleDrop : { | 805 | handleDrop : { |
799 | value: function(event) { | 806 | value: function(event) { |
807 | if (this.parentComponent.parentComponent.draggingType !== "layer") { | ||
808 | return; | ||
809 | } | ||
800 | event.stopPropagation(); | 810 | event.stopPropagation(); |
801 | this.element.classList.remove("dragOver"); | 811 | this.element.classList.remove("dragOver"); |
802 | if (this.parentComponent.parentComponent.dragLayerID !== this.layerID) { | 812 | if (this.parentComponent.parentComponent.dragLayerID !== this.layerID) { |