diff options
author | Jonathan Duran | 2012-05-04 22:32:38 -0700 |
---|---|---|
committer | Jonathan Duran | 2012-05-04 22:32:38 -0700 |
commit | 9f71f7804bd649dbfb9078cc0bef562530738e6f (patch) | |
tree | da5d4aa2f894e840dd044d890e0d0cae6c7c2843 /js/panels/Timeline/Keyframe.reel/Keyframe.js | |
parent | eaef072648eb539e648aabf7bc1aea8d02c21085 (diff) | |
parent | 2ea8a62835f4c20efff2623306e7205e6f5bf0ba (diff) | |
download | ninja-9f71f7804bd649dbfb9078cc0bef562530738e6f.tar.gz |
Merge branch 'refs/heads/TimelineUber' into TimelineProps
Conflicts:
js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/Keyframe.reel/Keyframe.js')
-rw-r--r-- | js/panels/Timeline/Keyframe.reel/Keyframe.js | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.js b/js/panels/Timeline/Keyframe.reel/Keyframe.js index 859cdfb1..f7259d29 100644 --- a/js/panels/Timeline/Keyframe.reel/Keyframe.js +++ b/js/panels/Timeline/Keyframe.reel/Keyframe.js | |||
@@ -31,6 +31,17 @@ var Keyframe = exports.Keyframe = Montage.create(Component, { | |||
31 | prepareForDraw:{ | 31 | prepareForDraw:{ |
32 | value:function(){ | 32 | value:function(){ |
33 | this.element.addEventListener("click", this, false); | 33 | this.element.addEventListener("click", this, false); |
34 | |||
35 | // Drag and drop event handlers | ||
36 | this.element.addEventListener("mouseover", this.handleMouseover.bind(this), false); | ||
37 | this.element.addEventListener("mouseout", this.handleMouseout.bind(this), false); | ||
38 | this.element.addEventListener("dragstart", this.handleDragstart.bind(this), false); | ||
39 | this.element.addEventListener("dragend", this.handleDragend.bind(this), false); | ||
40 | |||
41 | |||
42 | |||
43 | |||
44 | |||
34 | } | 45 | } |
35 | }, | 46 | }, |
36 | 47 | ||
@@ -57,5 +68,29 @@ var Keyframe = exports.Keyframe = Montage.create(Component, { | |||
57 | value:function(ev){ | 68 | value:function(ev){ |
58 | this.selectKeyframe(); | 69 | this.selectKeyframe(); |
59 | } | 70 | } |
60 | } | 71 | }, |
72 | |||
73 | handleMouseover: { | ||
74 | value: function(event) { | ||
75 | this.element.draggable = true; | ||
76 | } | ||
77 | }, | ||
78 | handleMouseout: { | ||
79 | value: function(event) { | ||
80 | this.element.draggable = false; | ||
81 | } | ||
82 | }, | ||
83 | handleDragstart: { | ||
84 | value: function(event) { | ||
85 | //this.parentComponent.parentComponent.dragLayerID = this.layerID; | ||
86 | event.dataTransfer.setData('Text', 'Keyframe'); | ||
87 | this.parentComponent.parentComponent.parentComponent.draggingIndex = this.parentComponent.tweenID; | ||
88 | } | ||
89 | }, | ||
90 | handleDragend: { | ||
91 | value: function(event) { | ||
92 | this.parentComponent.isDragging = false; | ||
93 | } | ||
94 | } | ||
95 | |||
61 | }); | 96 | }); |