From a39bad832722a10f6556f91e94c3301a41f59bd5 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Mon, 6 Feb 2012 13:30:49 -0800 Subject: merge new timeline Signed-off-by: Jonathan Duran --- js/panels/Timeline/Tween.reel/Tween.html | 47 ++++++++++++ js/panels/Timeline/Tween.reel/Tween.js | 109 ++++++++++++++++++++++++++++ js/panels/Timeline/Tween.reel/css/Tween.css | 4 + 3 files changed, 160 insertions(+) create mode 100644 js/panels/Timeline/Tween.reel/Tween.html create mode 100644 js/panels/Timeline/Tween.reel/Tween.js create mode 100644 js/panels/Timeline/Tween.reel/css/Tween.css (limited to 'js/panels/Timeline/Tween.reel') diff --git a/js/panels/Timeline/Tween.reel/Tween.html b/js/panels/Timeline/Tween.reel/Tween.html new file mode 100644 index 00000000..3e72acc0 --- /dev/null +++ b/js/panels/Timeline/Tween.reel/Tween.html @@ -0,0 +1,47 @@ + + + + + + + + + +
+
+
+
+
+
+ + + \ No newline at end of file diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js new file mode 100644 index 00000000..64e998c3 --- /dev/null +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -0,0 +1,109 @@ +var Montage = require("montage/core/core").Montage; +var Component = require("montage/ui/component").Component; + +var Tween = exports.Tween = Montage.create(Component, { + + hasTemplate:{ + value: true + }, + + _spanWidth: { + value: 0 + }, + + spanWidth: { + serializable:true, + get: function(){ + return this._spanWidth; + }, + set: function(value){ + this._spanWidth = value; + } + }, + + _spanPosition:{ + value: 0 + }, + + spanPosition:{ + serializable:true, + get:function () { + return this._spanPosition; + }, + set:function (value) { + this._spanPosition = value; + } + }, + + _keyFramePosition:{ + value:0 + }, + + keyFramePosition:{ + serializable:true, + get:function () { + return this._keyFramePosition; + }, + set:function (value) { + this._keyFramePosition = value; + } + }, + + _keyFrameMillisec:{ + value:0 + }, + + keyFrameMillisec:{ + serializable:true, + get:function () { + return this._keyFrameMillisec; + }, + set:function (value) { + this._keyFrameMillisec = value; + } + }, + + _keyframeID:{ + value:0 + }, + + keyframeID:{ + serializable:true, + get:function () { + return this._keyframeID; + }, + set:function (value) { + this._keyframeID = value; + } + }, + + _timelineTrack:{ + value:0 + }, + + timelineTrack:{ + serializable:true, + get:function () { + return this._timelineTrack; + }, + set:function (value) { + this._timelineTrack = value; + } + }, + + prepareForDraw:{ + value:function(){ + this.keyframe.containingTrack = this.timelineTrack; + } + }, + + draw:{ + value:function(){ + this.span.spanWidth = this.spanWidth; + this.keyframe.position = this.spanWidth; + this.keyframe.timelinePosition = this.keyFramePosition; + this.keyframe.id = this.keyframeID; + this.tweencontainer.style.left = this.spanPosition + "px"; + } + } +}); diff --git a/js/panels/Timeline/Tween.reel/css/Tween.css b/js/panels/Timeline/Tween.reel/css/Tween.css new file mode 100644 index 00000000..942f9fc9 --- /dev/null +++ b/js/panels/Timeline/Tween.reel/css/Tween.css @@ -0,0 +1,4 @@ +.tween_container{ + height: 16px; + position: absolute; +} \ No newline at end of file -- cgit v1.2.3 From 8cb53b7ec3b4f34fd77945256ad80bc1ae54b887 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Tue, 7 Feb 2012 21:28:14 -0800 Subject: Add Span color highlight for animated spans and restyle keyframes Signed-off-by: Jonathan Duran --- js/panels/Timeline/Tween.reel/Tween.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'js/panels/Timeline/Tween.reel') diff --git a/js/panels/Timeline/Tween.reel/Tween.html b/js/panels/Timeline/Tween.reel/Tween.html index 3e72acc0..307dcd02 100644 --- a/js/panels/Timeline/Tween.reel/Tween.html +++ b/js/panels/Timeline/Tween.reel/Tween.html @@ -28,7 +28,8 @@ "module": "js/panels/Timeline/Keyframe.reel", "name": "Keyframe", "properties": { - "element": {"#": "keyframe_container"} + "element": {"#": "keyframe_container"}, + "containingSpan": {"@": "span"} } } } -- cgit v1.2.3 From 112ba5f5beea03010d40a53a64bfa9595e0faa88 Mon Sep 17 00:00:00 2001 From: Jonathan Duran Date: Thu, 9 Feb 2012 09:09:01 -0800 Subject: Cleaning up more code and adding more models for timeline Signed-off-by: Jonathan Duran --- js/panels/Timeline/Tween.reel/Tween.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'js/panels/Timeline/Tween.reel') diff --git a/js/panels/Timeline/Tween.reel/Tween.js b/js/panels/Timeline/Tween.reel/Tween.js index 64e998c3..eddf1b17 100644 --- a/js/panels/Timeline/Tween.reel/Tween.js +++ b/js/panels/Timeline/Tween.reel/Tween.js @@ -92,17 +92,17 @@ var Tween = exports.Tween = Montage.create(Component, { }, prepareForDraw:{ - value:function(){ + value:function () { this.keyframe.containingTrack = this.timelineTrack; + this.keyframe.position = this.spanWidth; + this.keyframe.timelinePosition = this.keyFramePosition; + this.keyframe.id = this.keyframeID; } }, draw:{ - value:function(){ + value:function () { this.span.spanWidth = this.spanWidth; - this.keyframe.position = this.spanWidth; - this.keyframe.timelinePosition = this.keyFramePosition; - this.keyframe.id = this.keyframeID; this.tweencontainer.style.left = this.spanPosition + "px"; } } -- cgit v1.2.3