aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Keyframe.reel/Keyframe.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/Keyframe.reel/Keyframe.js')
-rw-r--r--js/panels/Timeline/Keyframe.reel/Keyframe.js68
1 files changed, 34 insertions, 34 deletions
diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.js b/js/panels/Timeline/Keyframe.reel/Keyframe.js
index 9ded9c76..201b912c 100644
--- a/js/panels/Timeline/Keyframe.reel/Keyframe.js
+++ b/js/panels/Timeline/Keyframe.reel/Keyframe.js
@@ -70,12 +70,12 @@ var Keyframe = exports.Keyframe = Montage.create(Component, {
70 prepareForDraw:{ 70 prepareForDraw:{
71 value:function(){ 71 value:function(){
72 this.element.addEventListener("click", this, false); 72 this.element.addEventListener("click", this, false);
73 73
74 // Drag and drop event handlers 74 // Drag and drop event handlers
75 this.element.addEventListener("mouseover", this.handleMouseover.bind(this), false); 75 this.element.addEventListener("mouseover", this.handleMouseover.bind(this), false);
76 this.element.addEventListener("mouseout", this.handleMouseout.bind(this), false); 76 this.element.addEventListener("mouseout", this.handleMouseout.bind(this), false);
77 this.element.addEventListener("dragstart", this.handleDragstart.bind(this), false); 77 this.element.addEventListener("dragstart", this.handleDragstart.bind(this), false);
78 this.element.addEventListener("dragend", this.handleDragend.bind(this), false); 78 this.element.addEventListener("dragend", this.handleDragend.bind(this), false);
79 } 79 }
80 }, 80 },
81 81
@@ -124,39 +124,39 @@ var Keyframe = exports.Keyframe = Montage.create(Component, {
124 ev.stopPropagation(); 124 ev.stopPropagation();
125 } 125 }
126 }, 126 },
127 127
128 handleMouseover: { 128 handleMouseover: {
129 value: function(event) { 129 value: function(event) {
130 this.element.draggable = true; 130 this.element.draggable = true;
131 } 131 }
132 }, 132 },
133 handleMouseout: { 133 handleMouseout: {
134 value: function(event) { 134 value: function(event) {
135 this.element.draggable = false; 135 this.element.draggable = false;
136 } 136 }
137 }, 137 },
138 handleDragstart: { 138 handleDragstart: {
139 value: function(event) { 139 value: function(event) {
140 //this.parentComponent.parentComponent.dragLayerID = this.layerID; 140 //this.parentComponent.parentComponent.dragLayerID = this.layerID;
141 event.dataTransfer.setData('Text', 'Keyframe'); 141 event.dataTransfer.setData('Text', 'Keyframe');
142 142
143 // Get my index in my track's tween array 143 // Get my index in my track's tween array
144 var i = 0, 144 var i = 0,
145 tweenRepetitionLength = this.parentComponent.parentComponent.parentComponent.tweenRepetition.childComponents.length, 145 tweenRepetitionLength = this.parentComponent.parentComponent.parentComponent.tweenRepetition.childComponents.length,
146 myIndex = null; 146 myIndex = null;
147 for (i = 0; i < tweenRepetitionLength; i++) { 147 for (i = 0; i < tweenRepetitionLength; i++) {
148 if (this.parentComponent.parentComponent.parentComponent.tweenRepetition.childComponents[i].uuid === this.parentComponent.uuid) { 148 if (this.parentComponent.parentComponent.parentComponent.tweenRepetition.childComponents[i].uuid === this.parentComponent.uuid) {
149 myIndex = i; 149 myIndex = i;
150 } 150 }
151 } 151 }
152 this.parentComponent.parentComponent.parentComponent.draggingIndex = myIndex; 152 this.parentComponent.parentComponent.parentComponent.draggingIndex = myIndex;
153 this.selectKeyframe(); 153 this.selectKeyframe();
154 } 154 }
155 }, 155 },
156 handleDragend: { 156 handleDragend: {
157 value: function(event) { 157 value: function(event) {
158 this.parentComponent.isDragging = false; 158 this.parentComponent.isDragging = false;
159 } 159 }
160 } 160 }
161 161
162}); 162});