diff options
author | Jonathan Duran | 2012-02-23 08:08:30 -0800 |
---|---|---|
committer | Jonathan Duran | 2012-02-23 08:08:30 -0800 |
commit | cf671b4855ecca0278128e82459691292a3d3dc9 (patch) | |
tree | 13a93345dc2427a0403c94ced3dfd5093d146310 /js/panels/Timeline/TimelineTrack.reel | |
parent | a712e134ea94b6a21061c1bd272ce15b1f95b986 (diff) | |
download | ninja-cf671b4855ecca0278128e82459691292a3d3dc9.tar.gz |
Timeline: Create new PropertyTrack subcomponent, and use it in the TimelineTrack component.
Cherry pick commit from jreid/Timeline-jreid
Signed-off-by: Jonathan Duran <jduran@motorola.com>
Diffstat (limited to 'js/panels/Timeline/TimelineTrack.reel')
4 files changed, 118 insertions, 30 deletions
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html index 4808e4d8..cabd92c0 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.html | |||
@@ -91,7 +91,51 @@ | |||
91 | "oneway": false | 91 | "oneway": false |
92 | } | 92 | } |
93 | } | 93 | } |
94 | } | 94 | }, |
95 | "positionTracksRepetition": { | ||
96 | "module": "montage/ui/repetition.reel", | ||
97 | "name": "Repetition", | ||
98 | "properties": { | ||
99 | "element": {"#": "content-position-tracks"}, | ||
100 | "isSelectionEnabled" : false | ||
101 | }, | ||
102 | "bindings": { | ||
103 | "objects": { | ||
104 | "boundObject": {"@": "owner"}, | ||
105 | "boundObjectPropertyPath": "arrPositionTracks", | ||
106 | "oneway": false | ||
107 | } | ||
108 | } | ||
109 | }, | ||
110 | "positionPropertyTrack" : { | ||
111 | "module" : "js/panels/Timeline/PropertyTrack.reel", | ||
112 | "name" : "PropertyTrack", | ||
113 | "properties" : { | ||
114 | "element":{"#": "position-track-base"} | ||
115 | } | ||
116 | }, | ||
117 | "transformTracksRepetition": { | ||
118 | "module": "montage/ui/repetition.reel", | ||
119 | "name": "Repetition", | ||
120 | "properties": { | ||
121 | "element": {"#": "content-transform-tracks"}, | ||
122 | "isSelectionEnabled" : false | ||
123 | }, | ||
124 | "bindings": { | ||
125 | "objects": { | ||
126 | "boundObject": {"@": "owner"}, | ||
127 | "boundObjectPropertyPath": "arrTransformTracks", | ||
128 | "oneway": false | ||
129 | } | ||
130 | } | ||
131 | }, | ||
132 | "transformPropertyTrack" : { | ||
133 | "module" : "js/panels/Timeline/PropertyTrack.reel", | ||
134 | "name" : "PropertyTrack", | ||
135 | "properties" : { | ||
136 | "element":{"#": "transform-track-base"} | ||
137 | } | ||
138 | } | ||
95 | 139 | ||
96 | 140 | ||
97 | } | 141 | } |
@@ -108,20 +152,14 @@ | |||
108 | <div class="label-position collapsible-label collapsible-collapsed"> | 152 | <div class="label-position collapsible-label collapsible-collapsed"> |
109 | 153 | ||
110 | </div> | 154 | </div> |
111 | <div class="content-position collapsible-content collapsible-collapsed"> | 155 | <div class="content-position collapsible-content collapsible-collapsed" id="content-position-tracks"> |
112 | <div class="timeline-track"></div> | 156 | <div id="position-track-base"></div> |
113 | <div class="timeline-track"></div> | ||
114 | <div class="timeline-track"></div> | ||
115 | </div> | 157 | </div> |
116 | <div class="label-transform collapsible-label collapsible-collapsed"> | 158 | <div class="label-transform collapsible-label collapsible-collapsed"> |
117 | 159 | ||
118 | </div> | 160 | </div> |
119 | <div class="content-transform collapsible-content collapsible-collapsed"> | 161 | <div class="content-transform collapsible-content collapsible-collapsed" id="content-transform-tracks"> |
120 | <div class="timeline-track"></div> | 162 | <div id="transform-track-base"></div> |
121 | <div class="timeline-track"></div> | ||
122 | <div class="timeline-track"></div> | ||
123 | <div class="timeline-track"></div> | ||
124 | <div class="timeline-track"></div> | ||
125 | </div> | 163 | </div> |
126 | <div class="label-styles collapsible-label collapsible-collapsed"> | 164 | <div class="label-styles collapsible-label collapsible-collapsed"> |
127 | 165 | ||
diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 1c33a040..de2c75c7 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js | |||
@@ -114,6 +114,71 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
114 | this.needsDraw = true; | 114 | this.needsDraw = true; |
115 | } | 115 | } |
116 | }, | 116 | }, |
117 | |||
118 | /* Position Property Tracks */ | ||
119 | _arrPositionTracks : { | ||
120 | serializable:true, | ||
121 | enumerable:true, | ||
122 | value: [] | ||
123 | }, | ||
124 | arrPositionTracks: { | ||
125 | serializable:true, | ||
126 | enumerable:true, | ||
127 | get: function() { | ||
128 | return this._arrPositionTracks; | ||
129 | }, | ||
130 | set: function(newVal) { | ||
131 | this._arrPositionTracks = newVal; | ||
132 | this.needsDraw = true; | ||
133 | } | ||
134 | }, | ||
135 | _positionTracksRepetition: { | ||
136 | serializable: true, | ||
137 | value: null | ||
138 | }, | ||
139 | positionTracksRepetition : { | ||
140 | serializable: true, | ||
141 | get: function() { | ||
142 | return this._positionTracksRepetition; | ||
143 | }, | ||
144 | set: function(newVal) { | ||
145 | this._positionTracksRepetition = newVal; | ||
146 | this.needsDraw = true; | ||
147 | } | ||
148 | }, | ||
149 | |||
150 | |||
151 | /* Transform Property Tracks */ | ||
152 | _arrTransformTracks : { | ||
153 | serializable:true, | ||
154 | enumerable:true, | ||
155 | value: [] | ||
156 | }, | ||
157 | arrTransformTracks: { | ||
158 | serializable:true, | ||
159 | enumerable:true, | ||
160 | get: function() { | ||
161 | return this._arrTransformTracks; | ||
162 | }, | ||
163 | set: function(newVal) { | ||
164 | this._arrTransformTracks = newVal; | ||
165 | this.needsDraw = true; | ||
166 | } | ||
167 | }, | ||
168 | _transformTracksRepetition: { | ||
169 | serializable: true, | ||
170 | value: null | ||
171 | }, | ||
172 | transformTracksRepetition : { | ||
173 | serializable: true, | ||
174 | get: function() { | ||
175 | return this._transformTracksRepetition; | ||
176 | }, | ||
177 | set: function(newVal) { | ||
178 | this._transformTracksRepetition = newVal; | ||
179 | this.needsDraw = true; | ||
180 | } | ||
181 | }, | ||
117 | 182 | ||
118 | _tweens:{ | 183 | _tweens:{ |
119 | enumerable: false, | 184 | enumerable: false, |
@@ -414,6 +479,10 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { | |||
414 | init:{ | 479 | init:{ |
415 | value:function () { | 480 | value:function () { |
416 | var that = this; | 481 | var that = this; |
482 | |||
483 | this.arrPositionTracks = [0, 1, 2]; | ||
484 | this.arrTransformTracks = [0, 1, 2, 3, 4]; | ||
485 | |||
417 | this.label = this.element.querySelector(".label-main"); | 486 | this.label = this.element.querySelector(".label-main"); |
418 | this.myContent = this.element.querySelector(".content-main"); | 487 | this.myContent = this.element.querySelector(".content-main"); |
419 | this.labelPosition = this.element.querySelector(".label-position"); | 488 | this.labelPosition = this.element.querySelector(".label-position"); |
diff --git a/js/panels/Timeline/TimelineTrack.reel/css/TimelineTrack.css b/js/panels/Timeline/TimelineTrack.reel/css/TimelineTrack.css index 842015e9..7a778e25 100644 --- a/js/panels/Timeline/TimelineTrack.reel/css/TimelineTrack.css +++ b/js/panels/Timeline/TimelineTrack.reel/css/TimelineTrack.css | |||
@@ -53,14 +53,3 @@ | |||
53 | background-color: #474747; | 53 | background-color: #474747; |
54 | color: white; | 54 | color: white; |
55 | } | 55 | } |
56 | |||
57 | /* line 63, ../scss/TimelineTrack.scss */ | ||
58 | .tl_layertracks .collapsible-content .timeline-track { | ||
59 | height: 20px; | ||
60 | border-bottom: 1px solid #505050; | ||
61 | } | ||
62 | |||
63 | /* line 69, ../scss/TimelineTrack.scss */ | ||
64 | .timeline-track .content-main { | ||
65 | background-color: #474747; | ||
66 | } | ||
diff --git a/js/panels/Timeline/TimelineTrack.reel/scss/TimelineTrack.scss b/js/panels/Timeline/TimelineTrack.reel/scss/TimelineTrack.scss index 01dd948c..43d5f438 100644 --- a/js/panels/Timeline/TimelineTrack.reel/scss/TimelineTrack.scss +++ b/js/panels/Timeline/TimelineTrack.reel/scss/TimelineTrack.scss | |||
@@ -60,12 +60,4 @@ | |||
60 | color: $color-panel-text; | 60 | color: $color-panel-text; |
61 |