aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKruti Shah2012-07-03 15:10:45 -0700
committerKruti Shah2012-07-03 15:10:45 -0700
commit14f30bb927f2cb4a27c81fd6ee4e8d9af46b4404 (patch)
tree4c8ad3e68c3b71639f2718d7100a75f11bdefbdd
parentf9c592ac8284cace4daed6f2ac87fe15dfad873c (diff)
downloadninja-14f30bb927f2cb4a27c81fd6ee4e8d9af46b4404.tar.gz
Refactor Code + Bug Fix for the Colorchip disappear between breadcrumb navigation
Signed-off-by: Kruti Shah <kruti.shah@motorola.com>
-rw-r--r--js/panels/Timeline/Span.reel/Span.js1
-rw-r--r--js/panels/Timeline/Style.reel/Style.js7
-rw-r--r--js/panels/Timeline/Track.reel/Track.html63
-rw-r--r--js/panels/Timeline/Track.reel/Track.js187
-rw-r--r--js/panels/Timeline/Track.reel/css/Track.css32
-rw-r--r--js/panels/Timeline/Track.reel/images/gridline.jpgbin724 -> 0 bytes
6 files changed, 0 insertions, 290 deletions
diff --git a/js/panels/Timeline/Span.reel/Span.js b/js/panels/Timeline/Span.reel/Span.js
index 51b9a4ce..f588a0eb 100644
--- a/js/panels/Timeline/Span.reel/Span.js
+++ b/js/panels/Timeline/Span.reel/Span.js
@@ -177,7 +177,6 @@ var Span = exports.Span = Montage.create(Component, {
177 this.parentTween.easing = this.easing; 177 this.parentTween.easing = this.easing;
178 this.parentTween.tweenData.easing = this.easing; 178 this.parentTween.tweenData.easing = this.easing;
179 179
180 // Unbind the event handler
181 this.application.ninja.timeline.easingMenu.popup.contentEl.removeEventListener("click"); 180 this.application.ninja.timeline.easingMenu.popup.contentEl.removeEventListener("click");
182 this.hideEasingMenu(); 181 this.hideEasingMenu();
183 } 182 }
diff --git a/js/panels/Timeline/Style.reel/Style.js b/js/panels/Timeline/Style.reel/Style.js
index c8d323a9..c44a29f6 100644
--- a/js/panels/Timeline/Style.reel/Style.js
+++ b/js/panels/Timeline/Style.reel/Style.js
@@ -349,12 +349,6 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, {
349 var tweenable = {}, 349 var tweenable = {},
350 i = 0; 350 i = 0;
351 351
352 if (this.ruleTweener === true) {
353 return;
354 } else {
355 this.ruleTweener = true;
356 }
357
358 tweenable.tweener = "input"; 352 tweenable.tweener = "input";
359 353
360 for (i = 0; i < this._myTweenables.length; i++) { 354 for (i = 0; i < this._myTweenables.length; i++) {
@@ -391,7 +385,6 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, {
391 this._borderSide = tweenable.strokePosition 385 this._borderSide = tweenable.strokePosition
392 } 386 }
393 } 387 }
394
395 if (this.addedColorChips === false && this.application.ninja.colorController.colorPanelDrawn) { 388 if (this.addedColorChips === false && this.application.ninja.colorController.colorPanelDrawn) {
396 // setup fill color 389 // setup fill color
397 this._fillColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 }; 390 this._fillColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 };
diff --git a/js/panels/Timeline/Track.reel/Track.html b/js/panels/Timeline/Track.reel/Track.html
deleted file mode 100644
index 0f0c7c9c..00000000
--- a/js/panels/Timeline/Track.reel/Track.html
+++ /dev/null
@@ -1,63 +0,0 @@
1<!DOCTYPE html>
2<!-- <copyright>
3 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
4 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
5 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
6 </copyright> -->
7<html lang="en">
8 <head>
9 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
10 <link rel="stylesheet" type="text/css" href="css/Track.css">
11 <script type="text/montage-serialization">
12 {
13 "owner": {
14 "prototype": "js/panels/Timeline/Track.reel",
15 "properties": {
16 "element": {"#": "track"},
17 "spanRepetition" : {"@" : "spanRepetition"},
18 "track_lane": {"#": "track_lane"}
19 }
20 },
21
22 "trackslot": {
23 "prototype": "montage/ui/slot.reel",
24 "properties": {
25 "element": {"#": "track_lane"}
26 },
27 "bindings" : {
28 "content" : {
29 "boundObject" : {"@": "spanRepetition"},
30 "boundObjectPropertyPath" : "objectAtCurrentIteration",
31 "oneway" : false
32 }
33 }
34 },
35
36 "spanRepetition": {
37 "prototype": "montage/ui/repetition.reel",
38 "properties": {
39 "element": {"#": "track_lanes"},
40 "isSelectionEnabled" : true
41 },
42 "bindings": {
43 "objects": {
44 "boundObject": {"@": "owner"},
45 "boundObjectPropertyPath": "spans",
46 "oneway": false
47 }
48 }
49 }
50
51 }
52 </script>
53 </head>
54 <body>
55
56 <div data-montage-id="track">
57 <div data-montage-id="track_lanes">
58 <div data-montage-id="track_lane" class="tracklane"></div>
59 </div>
60 </div>
61
62 </body>
63</html> \ No newline at end of file
diff --git a/js/panels/Timeline/Track.reel/Track.js b/js/panels/Timeline/Track.reel/Track.js
deleted file mode 100644
index 2ef760b7..00000000
--- a/js/panels/Timeline/Track.reel/Track.js
+++ /dev/null
@@ -1,187 +0,0 @@
1/* <copyright>
2 This file contains proprietary software owned by Motorola Mobility, Inc.<br/>
3 No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.<br/>
4 (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved.
5 </copyright> */
6
7var Montage = require("montage/core/core").Montage;
8var Component = require("montage/ui/component").Component;
9var defaultEventManager = require("montage/core/event/event-manager").defaultEventManager;
10
11var Track = exports.Track = Montage.create(Component, {
12
13 track_lane: {
14 value: null,
15 serializable: true
16 },
17
18 _trackID:{
19 value:null
20 },
21
22 trackID:{
23 get:function(){
24 return this._trackID;
25 },
26 set:function(value){
27 this._trackID = value;
28 }
29 },
30
31 _spans:{
32 value:[]
33 },
34
35 spans:{
36 serializable:true,
37 get:function () {
38 return this._spans;
39 },
40 set:function (newVal) {
41 this._spans = newVal;
42 }
43 },
44
45 _spanRepetition:{
46 value:null
47 },
48
49 spanRepetition:{
50 get:function () {
51 return this._spanRepetition;
52 },
53 set:function (newVal) {
54 this._spanRepetition = newVal;
55 }
56 },
57
58 trackDuration:{
59 value:0
60 },
61
62 currentKeyframe:{
63 value:0
64 },
65
66 currentMillisecClicked:{
67 value: 0
68 },
69
70 isAnimated:{
71 value:false
72 },
73
74 animatedElement:{
75 value:null
76 },
77
78 ninjaStylesContoller:{
79 value: null
80 },
81
82 //TEMP
83 keyFrames:{
84 serializable: true,
85 value:[]
86 },
87
88 prepareForDraw: {
89 value: function() {
90 this.keyFrames = new Array();
91 this.spans = new Array();
92 this.track_lane.addEventListener("click", this, false);
93 this.addNewEndPoint(0);
94
95 this.ninjaStylesContoller = this.application.ninja.stylesController;
96 }
97 },
98
99 handleNewTween:{
100 value: function(event){
101 var newTween = Tween.create();
102 }
103 },
104
105 handleClick:{
106 value:function (ev) {
107 var currentMillisecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80);
108 this.currentMillisecClicked = currentMillisecPerPixel * (ev.offsetX + parseInt(ev.target.style.left));
109
110 // TEMP - if the SHIFT key is down, add a new keyframe or split an existing span
111 // This needs to move to a keyboard shortcut that is TBD
112 if (ev.shiftKey) {
113 var prevFrame = this.keyFrames[this.keyFrames.length - 1][0];
114 if (ev.offsetX > prevFrame) {
115 this.addNewEndPoint(ev.offsetX);
116 this.currentMillisecClicked = currentMillisecPerPixel * ev.offsetX;
117 } else {