aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Layer.reel/Layer.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/Layer.reel/Layer.js')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js10
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 34c300df..c213cb70 100644
--- a/js/panels/Timeline/Layer.reel/Layer.js
+++ b/js/panels/Timeline/Layer.reel/Layer.js
@@ -868,6 +868,9 @@ var Layer = exports.Layer = Montage.create(Component, {
868 }, 868 },
869 handleDragleave: { 869 handleDragleave: {
870 value: function(event) { 870 value: function(event) {
871 if (this.parentComponent.parentComponent.draggingType !== "layer") {
872 return;
873 }
871 this.element.classList.remove("dragOver"); 874 this.element.classList.remove("dragOver");
872 } 875 }
873 }, 876 },
@@ -875,10 +878,14 @@ var Layer = exports.Layer = Montage.create(Component, {
875 value: function(event) { 878 value: function(event) {
876 this.parentComponent.parentComponent.dragLayerID = this.layerID; 879 this.parentComponent.parentComponent.dragLayerID = this.layerID;
877 event.dataTransfer.setData('Text', 'Layer'); 880 event.dataTransfer.setData('Text', 'Layer');
881 this.parentComponent.parentComponent.draggingType = "layer";
878 } 882 }
879 }, 883 },
880 handleDragover: { 884 handleDragover: {
881 value: function(event) { 885 value: function(event) {
886 if (this.parentComponent.parentComponent.draggingType !== "layer") {
887 return;
888 }
882 event.preventDefault(); 889 event.preventDefault();
883 this.element.classList.add("dragOver"); 890 this.element.classList.add("dragOver");
884 event.dataTransfer.dropEffect = "move"; 891 event.dataTransfer.dropEffect = "move";
@@ -888,6 +895,9 @@ var Layer = exports.Layer = Montage.create(Component, {
888 895
889 handleDrop : { 896 handleDrop : {
890 value: function(event) { 897 value: function(event) {
898 if (this.parentComponent.parentComponent.draggingType !== "layer") {
899 return;
900 }
891 event.stopPropagation(); 901 event.stopPropagation();
892 this.element.classList.remove("dragOver"); 902 this.element.classList.remove("dragOver");
893 if (this.parentComponent.parentComponent.dragLayerID !== this.layerID) { 903 if (this.parentComponent.parentComponent.dragLayerID !== this.layerID) {