diff options
author | Jon Reid | 2012-06-12 13:32:02 -0700 |
---|---|---|
committer | Jon Reid | 2012-06-12 13:32:02 -0700 |
commit | 8c55dfcb0a669eef0a3bb406b70868078ef09810 (patch) | |
tree | e4d070fe1e67fea38cc0343eda297572da717efa /js/panels/Timeline/Keyframe.reel/Keyframe.js | |
parent | 8e98ce012f55576ddb979969a3a1d834301af0c7 (diff) | |
parent | 7887aafbff794e9c5f918c667e73a8386c38cf02 (diff) | |
download | ninja-8c55dfcb0a669eef0a3bb406b70868078ef09810.tar.gz |
Merge remote-tracking branch 'ninja-jduran/TimelineUber' into timeline-local
Diffstat (limited to 'js/panels/Timeline/Keyframe.reel/Keyframe.js')
-rw-r--r-- | js/panels/Timeline/Keyframe.reel/Keyframe.js | 26 |
1 files changed, 24 insertions, 2 deletions
diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.js b/js/panels/Timeline/Keyframe.reel/Keyframe.js index b91027b6..ba6952aa 100644 --- a/js/panels/Timeline/Keyframe.reel/Keyframe.js +++ b/js/panels/Timeline/Keyframe.reel/Keyframe.js | |||
@@ -28,6 +28,21 @@ var Keyframe = exports.Keyframe = Montage.create(Component, { | |||
28 | } | 28 | } |
29 | }, | 29 | }, |
30 | 30 | ||
31 | _isSelected:{ | ||
32 | value:false | ||
33 | }, | ||
34 | |||
35 | isSelected:{ | ||
36 | serializable:true, | ||
37 | get:function(){ | ||
38 | return this._isSelected; | ||
39 | }, | ||
40 | set:function(value){ | ||
41 | this._isSelected = value; | ||
42 | this.needsDraw = true; | ||
43 | } | ||
44 | }, | ||
45 | |||
31 | prepareForDraw:{ | 46 | prepareForDraw:{ |
32 | value:function(){ | 47 | value:function(){ |
33 | this.element.addEventListener("click", this, false); | 48 | this.element.addEventListener("click", this, false); |
@@ -42,21 +57,28 @@ var Keyframe = exports.Keyframe = Montage.create(Component, { | |||
42 | 57 | ||
43 | draw:{ | 58 | draw:{ |
44 | value:function(){ | 59 | value:function(){ |
60 | if(this.isSelected){ | ||
61 | this.element.classList.add("keyframeSelected"); | ||
62 | this.application.ninja.timeline.selectedStyle = this.parentComponent.parentComponent.parentComponent.trackEditorProperty; | ||
63 | }else{ | ||
64 | this.element.classList.remove("keyframeSelected"); | ||
65 | } | ||
45 | this.element.style.left = (this.position - 5) + "px"; | 66 | this.element.style.left = (this.position - 5) + "px"; |
46 | } | 67 | } |
47 | }, | 68 | }, |
48 | 69 | ||
49 | deselectKeyframe:{ | 70 | deselectKeyframe:{ |
50 | value:function(){ | 71 | value:function(){ |
51 | this.element.classList.remove("keyframeSelected"); | 72 | this.isSelected=false; |
52 | this.element.style.left = (this.position - 5) + "px"; | 73 | this.element.style.left = (this.position - 5) + "px"; |
53 | } | 74 | } |
54 | }, | 75 | }, |
55 | 76 | ||
56 | selectKeyframe:{ | 77 | selectKeyframe:{ |
57 | value:function(){ | 78 | value:function(){ |
58 | this.element.classList.add("keyframeSelected"); | 79 | this.isSelected=true; |
59 | this.element.style.left = (this.position - 6) + "px"; | 80 | this.element.style.left = (this.position - 6) + "px"; |
81 | this.application.ninja.timeline.selectedStyle = this.parentComponent.parentComponent.parentComponent.trackEditorProperty | ||
60 | this.parentComponent.selectTween(); | 82 | this.parentComponent.selectTween(); |
61 | } | 83 | } |
62 | }, | 84 | }, |