diff options
author | Jon Reid | 2012-05-04 16:59:07 -0700 |
---|---|---|
committer | Jon Reid | 2012-05-04 16:59:07 -0700 |
commit | 2ea8a62835f4c20efff2623306e7205e6f5bf0ba (patch) | |
tree | 3578e221b62f9a0b8f967626262108c1609ad39d /js/panels/Timeline/Keyframe.reel/Keyframe.js | |
parent | 0d33ff651baf062b8e82f3a89b69b3ccae0cbe47 (diff) | |
download | ninja-2ea8a62835f4c20efff2623306e7205e6f5bf0ba.tar.gz |
Timeline: True drag-and-drop of keyframes
Diffstat (limited to 'js/panels/Timeline/Keyframe.reel/Keyframe.js')
-rw-r--r-- | js/panels/Timeline/Keyframe.reel/Keyframe.js | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.js b/js/panels/Timeline/Keyframe.reel/Keyframe.js index df5bdd67..f7259d29 100644 --- a/js/panels/Timeline/Keyframe.reel/Keyframe.js +++ b/js/panels/Timeline/Keyframe.reel/Keyframe.js | |||
@@ -36,6 +36,7 @@ var Keyframe = exports.Keyframe = Montage.create(Component, { | |||
36 | this.element.addEventListener("mouseover", this.handleMouseover.bind(this), false); | 36 | this.element.addEventListener("mouseover", this.handleMouseover.bind(this), false); |
37 | this.element.addEventListener("mouseout", this.handleMouseout.bind(this), false); | 37 | this.element.addEventListener("mouseout", this.handleMouseout.bind(this), false); |
38 | this.element.addEventListener("dragstart", this.handleDragstart.bind(this), false); | 38 | this.element.addEventListener("dragstart", this.handleDragstart.bind(this), false); |
39 | this.element.addEventListener("dragend", this.handleDragend.bind(this), false); | ||
39 | 40 | ||
40 | 41 | ||
41 | 42 | ||
@@ -83,7 +84,13 @@ var Keyframe = exports.Keyframe = Montage.create(Component, { | |||
83 | value: function(event) { | 84 | value: function(event) { |
84 | //this.parentComponent.parentComponent.dragLayerID = this.layerID; | 85 | //this.parentComponent.parentComponent.dragLayerID = this.layerID; |
85 | event.dataTransfer.setData('Text', 'Keyframe'); | 86 | event.dataTransfer.setData('Text', 'Keyframe'); |
87 | this.parentComponent.parentComponent.parentComponent.draggingIndex = this.parentComponent.tweenID; | ||
86 | } | 88 | } |
87 | }, | 89 | }, |
90 | handleDragend: { | ||
91 | value: function(event) { | ||
92 | this.parentComponent.isDragging = false; | ||
93 | } | ||
94 | } | ||
88 | 95 | ||
89 | }); | 96 | }); |