aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/TimelinePanel.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/TimelinePanel.reel')
-rw-r--r--js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
index 4b82814b..41472359 100644
--- a/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
+++ b/js/panels/Timeline/TimelinePanel.reel/TimelinePanel.js
@@ -273,6 +273,17 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
273 _dragLayerID : { 273 _dragLayerID : {
274 value: null 274 value: null
275 }, 275 },
276 _draggingType: {
277 value: false
278 },
279 draggingType: {
280 get: function() {
281 return this._draggingType;
282 },
283 set: function(newVal) {
284 this._draggingType = newVal;
285 }
286 },
276 287
277 layersDragged:{ 288 layersDragged:{
278 value:[], 289 value:[],
@@ -1499,6 +1510,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1499 }, 1510 },
1500 handleLayerDragover: { 1511 handleLayerDragover: {
1501 value: function(event) { 1512 value: function(event) {
1513 if (this.draggingType !== "layer") {
1514 return;
1515 }
1502 var currPos = 0, 1516 var currPos = 0,
1503 myScrollTest = ((event.y - (this._dragAndDropHelperOffset - this.user_layers.scrollTop)) + 28) - this.user_layers.scrollTop; 1517 myScrollTest = ((event.y - (this._dragAndDropHelperOffset - this.user_layers.scrollTop)) + 28) - this.user_layers.scrollTop;
1504 if ((myScrollTest < 60) && (this.user_layers.scrollTop >0)) { 1518 if ((myScrollTest < 60) && (this.user_layers.scrollTop >0)) {
@@ -1521,6 +1535,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1521 }, 1535 },
1522 handleLayerDragEnd : { 1536 handleLayerDragEnd : {
1523 value: function(event) { 1537 value: function(event) {
1538 if (this.draggingType !== "layer") {
1539 return;
1540 }
1524 this._deleteHelper = true; 1541 this._deleteHelper = true;
1525 this.needsDraw = true; 1542 this.needsDraw = true;
1526 1543
@@ -1528,6 +1545,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1528 }, 1545 },
1529 handleLayerDrop : { 1546 handleLayerDrop : {
1530 value: function(event) { 1547 value: function(event) {
1548 if (this.draggingType !== "layer") {
1549 return;
1550 }
1531 event.stopPropagation(); 1551 event.stopPropagation();
1532 event.preventDefault(); 1552 event.preventDefault();
1533 this._deleteHelper = true; 1553 this._deleteHelper = true;
@@ -1538,6 +1558,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1538 // Keyframe drag-and-drop 1558 // Keyframe drag-and-drop
1539 handleKeyframeDragover: { 1559 handleKeyframeDragover: {
1540 value: function(event) { 1560 value: function(event) {
1561 if (this.draggingType !== "keyframe") {
1562 return;
1563 }
1541 event.preventDefault(); 1564 event.preventDefault();
1542 var currPos = 0; 1565 var currPos = 0;
1543 /* 1566 /*
@@ -1574,6 +1597,9 @@ var TimelinePanel = exports.TimelinePanel = Montage.create(Component, {
1574 }, 1597 },
1575 handleKeyframeDrop: { 1598 handleKeyframeDrop: {
1576 value: function(event) { 1599 value: function(event) {
1600 if (this.draggingType !== "keyframe") {
1601 return;
1602 }
1577 event.stopPropagation(); 1603 event.stopPropagation();
1578 //this.element.classList.remove("dragOver"); 1604 //this.element.classList.remove("dragOver");
1579 //if (this.parentComponent.parentComponent.dragLayerID !== this.layerID) { 1605 //if (this.parentComponent.parentComponent.dragLayerID !== this.layerID) {