diff options
Diffstat (limited to 'js/panels/Timeline/Track.reel')
-rw-r--r-- | js/panels/Timeline/Track.reel/Track.html | 87 | ||||
-rw-r--r-- | js/panels/Timeline/Track.reel/Track.js | 211 | ||||
-rw-r--r-- | js/panels/Timeline/Track.reel/css/Track.css | 56 | ||||
-rw-r--r-- | js/panels/Timeline/Track.reel/images/gridline.jpg | bin | 724 -> 0 bytes |
4 files changed, 0 insertions, 354 deletions
diff --git a/js/panels/Timeline/Track.reel/Track.html b/js/panels/Timeline/Track.reel/Track.html deleted file mode 100644 index 6be86ef6..00000000 --- a/js/panels/Timeline/Track.reel/Track.html +++ /dev/null | |||
@@ -1,87 +0,0 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!-- <copyright> | ||
3 | Copyright (c) 2012, Motorola Mobility, Inc | ||
4 | All Rights Reserved. | ||
5 | BSD License. | ||
6 | |||
7 | Redistribution and use in source and binary forms, with or without | ||
8 | modification, are permitted provided that the following conditions are met: | ||
9 | |||
10 | - Redistributions of source code must retain the above copyright notice, | ||
11 | this list of conditions and the following disclaimer. | ||
12 | - Redistributions in binary form must reproduce the above copyright | ||
13 | notice, this list of conditions and the following disclaimer in the | ||
14 | documentation and/or other materials provided with the distribution. | ||
15 | - Neither the name of Motorola Mobility nor the names of its contributors | ||
16 | may be used to endorse or promote products derived from this software | ||
17 | without specific prior written permission. | ||
18 | |||
19 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
20 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
21 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
22 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
23 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
24 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
25 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
26 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
27 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
28 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
29 | POSSIBILITY OF SUCH DAMAGE. | ||
30 | </copyright> --> | ||
31 | <html lang="en"> | ||
32 | <head> | ||
33 | <meta http-equiv="content-type" content="text/html; charset=utf-8" /> | ||
34 | <link rel="stylesheet" type="text/css" href="css/Track.css"> | ||
35 | <script type="text/montage-serialization"> | ||
36 | { | ||
37 | "owner": { | ||
38 | "prototype": "js/panels/Timeline/Track.reel", | ||
39 | "properties": { | ||
40 | "element": {"#": "track"}, | ||
41 | "spanRepetition" : {"@" : "spanRepetition"}, | ||
42 | "track_lane": {"#": "track_lane"} | ||
43 | } | ||
44 | }, | ||
45 | |||
46 | "trackslot": { | ||
47 | "prototype": "montage/ui/slot.reel", | ||
48 | "properties": { | ||
49 | "element": {"#": "track_lane"} | ||
50 | }, | ||
51 | "bindings" : { | ||
52 | "content" : { | ||
53 | "boundObject" : {"@": "spanRepetition"}, | ||
54 | "boundObjectPropertyPath" : "objectAtCurrentIteration", | ||
55 | "oneway" : false | ||
56 | } | ||
57 | } | ||
58 | }, | ||
59 | |||
60 | "spanRepetition": { | ||
61 | "prototype": "montage/ui/repetition.reel", | ||
62 | "properties": { | ||
63 | "element": {"#": "track_lanes"}, | ||
64 | "isSelectionEnabled" : true | ||
65 | }, | ||
66 | "bindings": { | ||
67 | "objects": { | ||
68 | "boundObject": {"@": "owner"}, | ||
69 | "boundObjectPropertyPath": "spans", | ||
70 | "oneway": false | ||
71 | } | ||
72 | } | ||
73 | } | ||
74 | |||
75 | } | ||
76 | </script> | ||
77 | </head> | ||
78 | <body> | ||
79 | |||
80 | <div data-montage-id="track"> | ||
81 | <div data-montage-id="track_lanes"> | ||
82 | <div data-montage-id="track_lane" class="tracklane"></div> | ||
83 | </div> | ||
84 | </div> | ||
85 | |||
86 | </body> | ||
87 | </html> | ||
diff --git a/js/panels/Timeline/Track.reel/Track.js b/js/panels/Timeline/Track.reel/Track.js deleted file mode 100644 index e1b03525..00000000 --- a/js/panels/Timeline/Track.reel/Track.js +++ /dev/null | |||
@@ -1,211 +0,0 @@ | |||
1 | /* <copyright> | ||
2 | Copyright (c) 2012, Motorola Mobility, Inc | ||
3 | All Rights Reserved. | ||
4 | BSD License. | ||
5 | |||
6 | Redistribution and use in source and binary forms, with or without | ||
7 | modification, are permitted provided that the following conditions are met: | ||
8 | |||
9 | - Redistributions of source code must retain the above copyright notice, | ||
10 | this list of conditions and the following disclaimer. | ||
11 | - Redistributions in binary form must reproduce the above copyright | ||
12 | notice, this list of conditions and the following disclaimer in the | ||
13 | documentation and/or other materials provided with the distribution. | ||
14 | - Neither the name of Motorola Mobility nor the names of its contributors | ||
15 | may be used to endorse or promote products derived from this software | ||
16 | without specific prior written permission. | ||
17 | |||
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
19 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
20 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
21 | ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE | ||
22 | LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
23 | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
24 | SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
25 | INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
26 | CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
27 | ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
28 | POSSIBILITY OF SUCH DAMAGE. | ||
29 | </copyright> */ | ||
30 | |||
31 | var Montage = require("montage/core/core").Montage; | ||
32 | var Component = require("montage/ui/component").Component; | ||
33 | var defaultEventManager = require("montage/core/event/event-manager").defaultEventManager; | ||
34 | |||
35 | var Track = exports.Track = Montage.create(Component, { | ||
36 | |||
37 | track_lane: { | ||
38 | value: null, | ||
39 | serializable: true | ||
40 | }, | ||
41 | |||
42 | _trackID:{ | ||
43 | value:null | ||
44 | }, | ||
45 | |||
46 | trackID:{ | ||
47 | get:function(){ | ||
48 | return this._trackID; | ||
49 | }, | ||
50 | set:function(value){ | ||
51 | this._trackID = value; | ||
52 | } | ||
53 | }, | ||
54 | |||
55 | _spans:{ | ||
56 | value:[] | ||
57 | }, | ||
58 | |||
59 | spans:{ | ||
60 | serializable:true, | ||
61 | get:function () { | ||
62 | return this._spans; | ||
63 | }, | ||
64 | set:function (newVal) { | ||
65 | this._spans = newVal; | ||
66 | } | ||
67 | }, | ||
68 | |||
69 | _spanRepetition:{ | ||
70 | value:null | ||
71 | }, | ||
72 | |||
73 | spanRepetition:{ | ||
74 | get:function () { | ||
75 | return this._spanRepetition; | ||
76 | }, | ||
77 | set:function (newVal) { | ||
78 | this._spanRepetition = newVal; | ||
79 | } | ||
80 | }, | ||
81 | |||
82 | trackDuration:{ | ||
83 | value:0 | ||
84 | }, | ||
85 | |||
86 | currentKeyframe:{ | ||
87 | value:0 | ||
88 | }, | ||
89 | |||
90 | currentMillisecClicked:{ | ||
91 | value: 0 | ||
92 | }, | ||
93 | |||
94 | isAnimated:{ | ||
95 | value:false | ||
96 | }, | ||
97 | |||
98 | animatedElement:{ | ||
99 | value:null | ||
100 | }, | ||
101 | |||
102 | ninjaStylesContoller:{ | ||
103 | value: null | ||
104 | }, | ||
105 | |||
106 | //TEMP | ||
107 | keyFrames:{ | ||
108 | serializable: true, | ||
109 | value:[] | ||
110 | }, | ||
111 | |||
112 | prepareForDraw: { | ||
113 | value: function() { | ||
114 | this.keyFrames = new Array(); | ||
115 | this.spans = new Array(); | ||
116 | this.track_lane.addEventListener("click", this, false); | ||
117 | this.addNewEndPoint(0); | ||
118 | |||
119 | this.ninjaStylesContoller = this.application.ninja.stylesController; | ||
120 | } | ||
121 | }, | ||
122 | |||
123 | handleNewTween:{ | ||
124 | value: function(event){ | ||
125 | var newTween = Tween.create(); | ||
126 | } | ||
127 | }, | ||
128 | |||
129 | handleClick:{ | ||
130 | value:function (ev) { | ||
131 | var currentMillisecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80); | ||
132 | this.currentMillisecClicked = currentMillisecPerPixel * (ev.offsetX + parseInt(ev.target.style.left)); | ||
133 | |||
134 | // TEMP - if the SHIFT key is down, add a new keyframe or split an existing span | ||
135 | // This needs to move to a keyboard shortcut that is TBD | ||
136 | if (ev.shiftKey) { | ||