aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Layer.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/Layer.reel')
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.html4
-rw-r--r--js/panels/Timeline/Layer.reel/Layer.js10
2 files changed, 11 insertions, 3 deletions
diff --git a/js/panels/Timeline/Layer.reel/Layer.html b/js/panels/Timeline/Layer.reel/Layer.html
index ba7c18c3..c7e7b575 100644
--- a/js/panels/Timeline/Layer.reel/Layer.html
+++ b/js/panels/Timeline/Layer.reel/Layer.html
@@ -17,13 +17,11 @@
17 "styleRepetition" : {"@":"repetition1"}, 17 "styleRepetition" : {"@":"repetition1"},
18 "dynamicLayerName" : {"@":"dtext1"}, 18 "dynamicLayerName" : {"@":"dtext1"},
19 "dynamicLayerTag" : {"@": "dtext2"}, 19 "dynamicLayerTag" : {"@": "dtext2"},
20 "slotStyle" : {"@":"slot1"},
21 "mainCollapser" : {"@" : "mainCollapser"}, 20 "mainCollapser" : {"@" : "mainCollapser"},
22 "positionCollapser" : {"@" : "positionCollapser"}, 21 "positionCollapser" : {"@" : "positionCollapser"},
23 "styleCollapser" : {"@" : "styleCollapser"}, 22 "styleCollapser" : {"@" : "styleCollapser"},
24 "clickerMain" : {"#" : "clicker-main"}, 23 "clickerMain" : {"#" : "clicker-main"},
25 "myLabel" : {"#" : "myLabel"}, 24 "myLabel" : {"#" : "myLabel"}
26 "dragDrop" : {"@" : "DragDrop"}
27 } 25 }
28 }, 26 },
29 "dtext1" : { 27 "dtext1" : {
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) {