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