From f3dc624fa464a79fd8e8cec1ddd16ed2109bda23 Mon Sep 17 00:00:00 2001 From: Ananya Sen Date: Fri, 10 Feb 2012 16:05:27 -0800 Subject: Revert "Merge from /joseeight/ninja-internal/tree/FileIO" This reverts commit c48eeb01bd726895dc577d8b843b2a75883eee07. Signed-off-by: Ananya Sen --- js/panels/Timeline/Keyframe.reel/Keyframe.html | 27 ---- js/panels/Timeline/Keyframe.reel/Keyframe.js | 154 ---------------------- js/panels/Timeline/Keyframe.reel/css/Keyframe.css | 15 --- 3 files changed, 196 deletions(-) delete mode 100644 js/panels/Timeline/Keyframe.reel/Keyframe.html delete mode 100644 js/panels/Timeline/Keyframe.reel/Keyframe.js delete mode 100644 js/panels/Timeline/Keyframe.reel/css/Keyframe.css (limited to 'js/panels/Timeline/Keyframe.reel') diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.html b/js/panels/Timeline/Keyframe.reel/Keyframe.html deleted file mode 100644 index bf21994b..00000000 --- a/js/panels/Timeline/Keyframe.reel/Keyframe.html +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - -
-
-
- - - \ No newline at end of file diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.js b/js/panels/Timeline/Keyframe.reel/Keyframe.js deleted file mode 100644 index c82a9086..00000000 --- a/js/panels/Timeline/Keyframe.reel/Keyframe.js +++ /dev/null @@ -1,154 +0,0 @@ -var Montage = require("montage/core/core").Montage; -var Component = require("montage/ui/component").Component; -var ElementsMediator = require("js/mediators/element-mediator").ElementMediator; - -var Keyframe = exports.Keyframe = Montage.create(Component, { - - hasTemplate:{ - value: true - }, - - _position:{ - value:0 - }, - - position:{ - serializable:true, - get:function(){ - return this._position; - }, - set:function(value){ - this._position = value; - } - }, - - _id:{ - value:0 - }, - - id:{ - serializable:true, - get:function () { - return this._id; - }, - set:function (value) { - this._id = value; - } - }, - - _timelinePosition:{ - value:0 - }, - - timelinePosition:{ - serializable:true, - get:function () { - return this._timelinePosition; - }, - set:function (value) { - this._timelinePosition = value; - } - }, - - _containingTrack:{ - value:{} - }, - - containingTrack:{ - serializable:true, - get:function () { - return this._containingTrack; - }, - set:function (value) { - this._containingTrack = value; - } - }, - - _animatedProperties:{ - value:[] - }, - - animatedProperties:{ - serializable:true, - get:function () { - return this._animatedProperties; - }, - set:function (value) { - this._animatedProperties = value; - } - }, - - containingSpan:{ - value: null - }, - - prepareForDraw:{ - value:function(){ - this.tweenkeyframe.addEventListener("click", this, false); - this.animatedProperties = new Array(); - this.animatedProperties["top"] = this.containingTrack.animatedElement.offsetTop; - this.animatedProperties["left"] = this.containingTrack.animatedElement.offsetLeft; - } - }, - - draw:{ - value:function(){ - this.tweenkeyframe.style.left = (this.position - 3) + "px"; - } - }, - - handleElementChange:{ - value:function (event) { - if(this.application.ninja.selectedElements[0]._element != this.containingTrack.animatedElement){ - alert("Wrong element selected for this keyframe track"); - return; - } - - if(event.detail.source && event.detail.source !== "keyframe") { - this.containingSpan.highlightSpan(); - if(this.containingTrack.animatedElement.offsetTop != this.animatedProperties["top"] && this.containingTrack.animatedElement.offsetLeft != this.animatedProperties["left"]){ - this.animatedProperties["top"] = this.containingTrack.animatedElement.offsetTop; - this.animatedProperties["left"] = this.containingTrack.animatedElement.offsetLeft; - this.containingTrack.keyFramePropertyData[this.id] = this.animatedProperties; - this.containingTrack.updateKeyframeRule(); - } - } - } - }, - - deselect:{ - value:function(){ - this.tweenkeyframe.classList.remove("keyframeSelected"); - this.eventManager.removeEventListener("elementChange", this, false); - } - }, - - select:{ - value:function(){ - this.application.ninja.timeline.deselectKeyframes(); - this.tweenkeyframe.classList.add("keyframeSelected"); - this.application.ninja.timeline.playhead.style.left = (this.timelinePosition - 2) + "px"; - this.application.ninja.timeline.playheadmarker.style.left = this.timelinePosition + "px"; - this.application.ninja.timeline.selectedKeyframes.push(this); - - var currentMillisecPerPixel = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80); - var currentMillisec = currentMillisecPerPixel * this.timelinePosition; - this.application.ninja.timeline.updateTimeText(currentMillisec); - - var currentTop = this.animatedProperties["top"] + "px"; - var currentLeft = this.animatedProperties["left"] + "px"; - - ElementsMediator.setProperty([this.containingTrack.animatedElement], "top", [currentTop], "Change", "keyframe"); - ElementsMediator.setProperty([this.containingTrack.animatedElement], "left", [currentLeft], "Change", "keyframe"); - - // turn on element change event listener - this.eventManager.addEventListener("elementChange", this, false); - } - }, - - handleClick:{ - value:function(ev){ - this.select(); - } - } -}); diff --git a/js/panels/Timeline/Keyframe.reel/css/Keyframe.css b/js/panels/Timeline/Keyframe.reel/css/Keyframe.css deleted file mode 100644 index 4afc1180..00000000 --- a/js/panels/Timeline/Keyframe.reel/css/Keyframe.css +++ /dev/null @@ -1,15 +0,0 @@ -.tween_keyframe{ - position: absolute; - height: 16px; - width: 5px; - background-color: white; - z-index: 23; - border-radius: 3px; -} - -.tween_keyframe.keyframeSelected{ - background-color: #570e19; - border-style: solid; - border-width: thin; - border-color: #d6d1cf; -} \ No newline at end of file -- cgit v1.2.3