aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Track.reel
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/Track.reel')
-rw-r--r--js/panels/Timeline/Track.reel/Track.html87
-rw-r--r--js/panels/Timeline/Track.reel/Track.js211
-rw-r--r--js/panels/Timeline/Track.reel/css/Track.css56
-rw-r--r--js/panels/Timeline/Track.reel/images/gridline.jpgbin724 -> 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>
3Copyright (c) 2012, Motorola Mobility, Inc
4All Rights Reserved.
5BSD License.
6
7Redistribution and use in source and binary forms, with or without
8modification, 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
19THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
20AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
21IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
22ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
23LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
24CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
25SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
26INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
27CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
28ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
29POSSIBILITY 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>
2Copyright (c) 2012, Motorola Mobility, Inc
3All Rights Reserved.
4BSD License.
5
6Redistribution and use in source and binary forms, with or without
7modification, 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
18THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
19AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
20IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
21ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
22LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28POSSIBILITY OF SUCH DAMAGE.
29</copyright> */
30
31var Montage = require("montage/core/core").Montage;
32var Component = require("montage/ui/component").Component;
33var defaultEventManager = require("montage/core/event/event-manager").defaultEventManager;
34
35var 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) {
137 var prevFrame = this.keyFrames[this.keyFrames.length - 1][0];
138 if (ev.offsetX > prevFrame) {
139 this.addNewEndPoint(ev.offsetX);
140 this.currentMillisecClicked = currentMillisecPerPixel * ev.offsetX;