From 2c60886f68e955195e7e024e0787965e972f0d81 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 19 Jun 2012 20:15:16 -0700 Subject: remove obsolete functions Signed-off-by: Jonathan Duran --- .../Timeline/PropertyTrack.reel/PropertyTrack.js | 40 --------------------- .../Timeline/TimelineTrack.reel/TimelineTrack.js | 42 ---------------------- 2 files changed, 82 deletions(-) (limited to 'js') diff --git a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js index 9971933f..c75e105d 100644 --- a/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js +++ b/js/panels/Timeline/PropertyTrack.reel/PropertyTrack.js @@ -302,46 +302,6 @@ var PropertyTrack = exports.PropertyTrack = Montage.create(Component, { } }, - splitPropTween:{ - value:function (ev) { - console.log("splitting sub prop tween with new keyframe"); - var clickPos = ev.target.parentElement.offsetLeft + ev.offsetX; - var i; - var tweensLength = this.propTweens.length - 1; - var prevTween, nextTween, splitTweenIndex; - for (i = 0; i < tweensLength; i++) { - prevTween = this.propTweens[i].tweenData.keyFramePosition; - nextTween = this.propTweens[i + 1].tweenData.keyFramePosition; - if (clickPos > prevTween && clickPos < nextTween) { - //console.log(clickPos + " found on tween: "+ this.tweens[i+1].tweenData.tweenID); - splitTweenIndex = this.propTweens[i + 1].tweenData.tweenID; - this.propTweens[i + 1].tweenData.spanWidth = this.propTweens[i + 1].tweenData.keyFramePosition - clickPos; - this.propTweens[i + 1].tweenData.spanPosition = ev.target.parentElement.offsetLeft + ev.offsetX; - if (ev.target.className != "tween-span") { - // don't set styles on timeline track if event is coming from the track - } else { - ev.target.style.width = this.propTweens[i + 1].tweenData.spanWidth + "px"; - ev.target.parentElement.style.left = clickPos + "px"; - ev.target.parentElement.children[1].style.left = (this.propTweens[i + 1].tweenData.spanWidth - 3) + "px"; - } - var newTweenToInsert = {}; - newTweenToInsert.tweenData = {}; - newTweenToInsert.tweenData.spanWidth = clickPos - prevTween; - newTweenToInsert.tweenData.keyFramePosition = clickPos; - newTweenToInsert.tweenData.keyFrameMillisec = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80) * clickPos; - newTweenToInsert.tweenData.tweenID = splitTweenIndex - 1; - newTweenToInsert.tweenData.spanPosition = clickPos - newTweenToInsert.tweenData.spanWidth; - newTweenToInsert.tweenData.tweenedProperties = []; - newTweenToInsert.tweenData.tweenedProperties[this.trackEditorProperty] = this.ninjaStylesContoller.getElementStyle(this.animatedElement, this.trackEditorProperty); - this.propTweens.splice(splitTweenIndex, 0, newTweenToInsert); - break; - } - } - this.application.ninja.currentDocument.model.needsSave = true; - } - }, - - // splitTweenAt: Split a tween at a particular position (x coordinate) splitPropTweenAt:{ value:function (position) { var i, j, nextComponentIndex, diff --git a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js index 1a8b6f4e..bf380e00 100644 --- a/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js +++ b/js/panels/Timeline/TimelineTrack.reel/TimelineTrack.js @@ -811,48 +811,6 @@ var TimelineTrack = exports.TimelineTrack = Montage.create(Component, { } }, - splitTween:{ - value:function (ev) { - var clickPos = ev.target.parentElement.offsetLeft + ev.offsetX, - i, - tweensLength = this.tweens.length-1, - prevTween, nextTween, splitTweenIndex; - - for(i=0; i prevTween && clickPos < nextTween){ - //console.log(clickPos + " found on tween: "+ this.tweens[i+1].tweenData.tweenID); - splitTweenIndex = this.tweens[i+1].tweenData.tweenID; - this.tweens[i+1].tweenData.spanWidth = this.tweens[i+1].tweenData.keyFramePosition - clickPos; - this.tweens[i+1].tweenData.spanPosition = ev.target.parentElement.offsetLeft + ev.offsetX; - if (ev.target.className != "tween-span") { - // don't set styles on timeline track if event is coming from the track - } else { - ev.target.style.width = this.tweens[i + 1].tweenData.spanWidth + "px"; - ev.target.parentElement.style.left = clickPos + "px"; - ev.target.parentElement.children[1].style.left = (this.tweens[i + 1].tweenData.spanWidth - 3) + "px"; - } - var newTweenToInsert = {}; - newTweenToInsert.tweenData = {}; - newTweenToInsert.tweenData.spanWidth = clickPos - prevTween; - newTweenToInsert.tweenData.keyFramePosition = clickPos; - newTweenToInsert.tweenData.keyFrameMillisec = Math.floor(this.application.ninja.timeline.millisecondsOffset / 80) * clickPos; - newTweenToInsert.tweenData.tweenID = splitTweenIndex - 1; - newTweenToInsert.tweenData.spanPosition = clickPos - newTweenToInsert.tweenData.spanWidth; - newTweenToInsert.tweenData.tweenedProperties = []; - newTweenToInsert.tweenData.tweenedProperties["top"] = this.animatedElement.offsetTop + "px"; - newTweenToInsert.tweenData.tweenedProperties["left"] = this.animatedElement.offsetLeft + "px"; - newTweenToInsert.tweenData.tweenedProperties["width"] = this.animatedElement.offsetWidth + "px"; - newTweenToInsert.tweenData.tweenedProperties["height"] = this.animatedElement.offsetHeight + "px"; - this.tweens.splice(splitTweenIndex, 0, newTweenToInsert); - break; - } - } - this.application.ninja.currentDocument.model.needsSave = true; - } - }, - // splitTweenAt: Split a tween at a particular position (x coordinate) splitTweenAt: { value:function (position) { -- cgit v1.2.3