aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Keyframe.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/Keyframe.reel')
-rw-r--r--js/panels/Timeline/Keyframe.reel/Keyframe.html16
-rw-r--r--js/panels/Timeline/Keyframe.reel/Keyframe.js68
2 files changed, 42 insertions, 42 deletions
diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.html b/js/panels/Timeline/Keyframe.reel/Keyframe.html
index 9f8baf86..6ef1e723 100644
--- a/js/panels/Timeline/Keyframe.reel/Keyframe.html
+++ b/js/panels/Timeline/Keyframe.reel/Keyframe.html
@@ -1,4 +1,4 @@
1<!DOCTYPE html> 1<!doctype html>
2<!-- <copyright> 2<!-- <copyright>
3Copyright (c) 2012, Motorola Mobility, Inc 3Copyright (c) 2012, Motorola Mobility, Inc
4All Rights Reserved. 4All Rights Reserved.
@@ -29,9 +29,9 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29POSSIBILITY OF SUCH DAMAGE. 29POSSIBILITY OF SUCH DAMAGE.
30</copyright> --> 30</copyright> -->
31<html lang="en"> 31<html lang="en">
32 <head> 32 <head>
33 <meta http-equiv="content-type" content="text/html; charset=utf-8" /> 33 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
34 <link rel="stylesheet" type="text/css" href="css/Keyframe.css"> 34 <link rel="stylesheet" type="text/css" href="css/Keyframe.css">
35 <script type="text/montage-serialization"> 35 <script type="text/montage-serialization">
36 { 36 {
37 "owner": { 37 "owner": {
@@ -43,11 +43,11 @@ POSSIBILITY OF SUCH DAMAGE.
43 43
44 } 44 }
45 </script> 45 </script>
46 </head> 46 </head>
47 <body> 47 <body>
48 48
49 <div data-montage-id="keyframespace" class="tween_keyframe"> 49 <div data-montage-id="keyframespace" class="tween_keyframe">
50 </div> 50 </div>
51 51
52 </body> 52 </body>
53</html> 53</html>
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});