From 14f30bb927f2cb4a27c81fd6ee4e8d9af46b4404 Mon Sep 17 00:00:00 2001 From: Kruti Shah Date: Tue, 3 Jul 2012 15:10:45 -0700 Subject: Refactor Code + Bug Fix for the Colorchip disappear between breadcrumb navigation Signed-off-by: Kruti Shah --- js/panels/Timeline/Span.reel/Span.js | 1 - js/panels/Timeline/Style.reel/Style.js | 7 - js/panels/Timeline/Track.reel/Track.html | 63 -------- js/panels/Timeline/Track.reel/Track.js | 187 ---------------------- js/panels/Timeline/Track.reel/css/Track.css | 32 ---- js/panels/Timeline/Track.reel/images/gridline.jpg | Bin 724 -> 0 bytes 6 files changed, 290 deletions(-) delete mode 100644 js/panels/Timeline/Track.reel/Track.html delete mode 100644 js/panels/Timeline/Track.reel/Track.js delete mode 100644 js/panels/Timeline/Track.reel/css/Track.css delete mode 100644 js/panels/Timeline/Track.reel/images/gridline.jpg 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, { this.parentTween.easing = this.easing; this.parentTween.tweenData.easing = this.easing; - // Unbind the event handler this.application.ninja.timeline.easingMenu.popup.contentEl.removeEventListener("click"); this.hideEasingMenu(); } 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, { var tweenable = {}, i = 0; - if (this.ruleTweener === true) { - return; - } else { - this.ruleTweener = true; - } - tweenable.tweener = "input"; for (i = 0; i < this._myTweenables.length; i++) { @@ -391,7 +385,6 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { this._borderSide = tweenable.strokePosition } } - if (this.addedColorChips === false && this.application.ninja.colorController.colorPanelDrawn) { // setup fill color 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 @@ - - - - - - - - - - -
-
-
-
-
- - - \ 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 @@ -/* - This file contains proprietary software owned by Motorola Mobility, Inc.
- No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
- (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -var Montage = require("montage/core/core").Montage; -var Component = require("montage/ui/component").Component; -var defaultEventManager = require("montage/core/event/event-manager").defaultEventManager; - -var Track = exports.Track = Montage.create(Component, { - - track_lane: { - value: null, - serializable: true - }, - - _trackID:{ - value:null - }, - - trackID:{ - get:function(){ - return this._trackID; - }, - set:function(value){ - this._trackID = value; - } - }, - - _spans:{ - value:[] - }, - - spans:{ - serializable:true, - get:function () { - return this._spans; - }, - set:function (newVal) { - this._spans = newVal; - } - }, - - _spanRepetition:{ - value:null - }, - - spanRepetition:{ - get:function () { - return this._spanRepetition; - }, - set:function (newVal) { - this._spanRepetition = newVal; - } - }, - - trackDuration:{ - value:0 - }, - - currentKeyframe:{ - value:0 - }, - - currentMillisecClicked:{ - value: 0 - }, - - isAnimated:{ - value:false - }, - - animatedElement:{ - value:null - }, - - ninjaStylesContoller:{ - value: null - }, - - //TEMP - keyFrames:{ - serializable: true, - value:[] - }, - - prepareForDraw: { - value: function() { - this.keyFrames = new Array(); - this.spans = new Array(); - this.track_lane.addEventListener("click", this, false); - this.addNewEndPoint(0); - - this.ninjaStylesContoller = this.application.ninja.stylesController; - } - }, - - handleNewTween:{ - value: function(event){ - var newTween = Tween.create(); - } - }, - - handleClick:{ - value:function (ev) { - var currentMillisecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80); - this.currentMillisecClicked = currentMillisecPerPixel * (ev.offsetX + parseInt(ev.target.style.left)); - - // TEMP - if the SHIFT key is down, add a new keyframe or split an existing span - // This needs to move to a keyboard shortcut that is TBD - if (ev.shiftKey) { - var prevFrame = this.keyFrames[this.keyFrames.length - 1][0]; - if (ev.offsetX > prevFrame) { - this.addNewEndPoint(ev.offsetX); - this.currentMillisecClicked = currentMillisecPerPixel * ev.offsetX; - } else { - this.currentMillisecClicked = currentMillisecPerPixel * (ev.offsetX + parseInt(ev.target.style.left)); - this.splitSpan(ev); - } - } - - console.log("currentMillisecClicked = " + this.currentMillisecClicked); - } - }, - - addNewEndPoint : { - value: function(xpos){ - var newKeyFrame = document.createElement("div"); - newKeyFrame.className = "keyframe"; - newKeyFrame.style.left = (xpos - 2) + "px"; - this.track_lane.appendChild(newKeyFrame); - - if(xpos > 0){ - var prevFrame = this.keyFrames[this.keyFrames.length - 1][0]; - - var newDefaultSpan = document.createElement("div"); - newDefaultSpan.className = "defaultSpan"; - newDefaultSpan.style.left = prevFrame + "px"; - newDefaultSpan.style.width = (xpos - prevFrame) + "px"; - this.track_lane.appendChild(newDefaultSpan); - - this.spans.push(newDefaultSpan); - } - - var keyframePercent = this.currentMillisecClicked / this.application.ninja.timeline.totalDuration; - var keyframeProperties; - - //console.log(keyframePercent); - - this.keyFrames.push([xpos, keyframePercent, keyframeProperties]); - //console.log(this.keyFrames) - } - }, - - splitSpan: { - value: function(ev){ - console.log("splitting span at span offsetX: " + ev.offsetX); - - //this.track_lane.removeChild(ev.target); - } - }, - - updateKeyframePercents:{ - value:function(){ - - } - }, - - addAnimationRuleToElement:{ - value: function(){ - - } - }, - - calculateKeyframePercent:{ - value:function() { - - } - }, - - buildKeyframesString:{ - value:function(){ - - } - } -}); \ No newline at end of file diff --git a/js/panels/Timeline/Track.reel/css/Track.css b/js/panels/Timeline/Track.reel/css/Track.css deleted file mode 100644 index b717acf1..00000000 --- a/js/panels/Timeline/Track.reel/css/Track.css +++ /dev/null @@ -1,32 +0,0 @@ -/* - This file contains proprietary software owned by Motorola Mobility, Inc.
- No rights, expressed or implied, whatsoever to this software are provided by Motorola Mobility, Inc. hereunder.
- (c) Copyright 2011 Motorola Mobility, Inc. All Rights Reserved. -
*/ - -.tracklane{ - height: 19px; - width: 100%; - color: white; - padding-top: 2px; - border-bottom: #444; - border-bottom-style: solid; - border-bottom-width: thin; - background-image: url("../images/gridline.jpg"); - overflow: hidden; -} - -.keyframe{ - position: absolute; - height: 16px; - width: 4px; - background-color: white; - -} - -.defaultSpan{ - position: absolute; - height: 16px; - opacity: 0.3; - background-color: white; -} \ No newline at end of file diff --git a/js/panels/Timeline/Track.reel/images/gridline.jpg b/js/panels/Timeline/Track.reel/images/gridline.jpg deleted file mode 100644 index 9f451b0a..00000000 Binary files a/js/panels/Timeline/Track.reel/images/gridline.jpg and /dev/null differ -- cgit v1.2.3