aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline')
-rw-r--r--js/panels/Timeline/Keyframe.reel/Keyframe.js28
-rw-r--r--js/panels/Timeline/Style.reel/Style.js8
2 files changed, 28 insertions, 8 deletions
diff --git a/js/panels/Timeline/Keyframe.reel/Keyframe.js b/js/panels/Timeline/Keyframe.reel/Keyframe.js
index b91027b6..c8255cc0 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,20 +57,29 @@ 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 this.application.ninja.timeline.selectedStyle = !(this.parentComponent.parentComponent.parentComponent.trackEditorProperty);
66 }
45 this.element.style.left = (this.position - 5) + "px"; 67 this.element.style.left = (this.position - 5) + "px";
46 } 68 }
47 }, 69 },
48 70
49 deselectKeyframe:{ 71 deselectKeyframe:{
50 value:function(){ 72 value:function(){
51 this.element.classList.remove("keyframeSelected"); 73 debugger;
74 this.isSelected=false;
52 this.element.style.left = (this.position - 5) + "px"; 75 this.element.style.left = (this.position - 5) + "px";
53 } 76 }
54 }, 77 },
55 78
56 selectKeyframe:{ 79 selectKeyframe:{
57 value:function(){ 80 value:function(){
58 this.element.classList.add("keyframeSelected"); 81 debugger;
82 this.isSelected=true;
59 this.element.style.left = (this.position - 6) + "px"; 83 this.element.style.left = (this.position - 6) + "px";
60 this.parentComponent.selectTween(); 84 this.parentComponent.selectTween();
61 } 85 }
diff --git a/js/panels/Timeline/Style.reel/Style.js b/js/panels/Timeline/Style.reel/Style.js
index ed7a281a..a0dc7c6b 100644
--- a/js/panels/Timeline/Style.reel/Style.js
+++ b/js/panels/Timeline/Style.reel/Style.js
@@ -376,14 +376,10 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, {
376 this._fillColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 }; 376 this._fillColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 };
377 this.application.ninja.colorController.addButton("chip", this._fillColorCtrl); 377 this.application.ninja.colorController.addButton("chip", this._fillColorCtrl);
378 this.abcelement = this._fillColorCtrl; 378 this.abcelement = this._fillColorCtrl;
379 var currentValue = ElementsMediator.getColor(this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.stageElement,true) 379 var currentValue = ElementsMediator.getColor(this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.stageElement,this._isFill,this._borderSide)
380 this._fillColorCtrl.addEventListener("change", this.handleFillColorChange.bind(this), false); 380 this._fillColorCtrl.addEventListener("change", this.handleFillColorChange.bind(this), false);
381 this.addedColorChips = true;
382 }
383
384 if (this.addedColorChips) {
385 this._fillColorCtrl.color(currentValue.colorMode, currentValue.color); 381 this._fillColorCtrl.color(currentValue.colorMode, currentValue.color);
386 // this._strokeColorCtrl.color(this._stroke.colorMode, this._stroke.color); 382 this.addedColorChips = true;
387 } 383 }
388 384
389 // TODO: set up color chip here. 385 // TODO: set up color chip here.