aboutsummaryrefslogtreecommitdiff
path: root/js/panels/Timeline/Style.reel/Style.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/panels/Timeline/Style.reel/Style.js')
-rw-r--r--js/panels/Timeline/Style.reel/Style.js25
1 files changed, 14 insertions, 11 deletions
diff --git a/js/panels/Timeline/Style.reel/Style.js b/js/panels/Timeline/Style.reel/Style.js
index a0dc7c6b..37f970c0 100644
--- a/js/panels/Timeline/Style.reel/Style.js
+++ b/js/panels/Timeline/Style.reel/Style.js
@@ -175,20 +175,19 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, {
175 addedColorChips: 175 addedColorChips:
176 { value: false }, 176 { value: false },
177 177
178 _abcelement: { 178 _colorelement: {
179 writable:true 179 writable:true
180 }, 180 },
181 181
182 abcelement: { 182 colorelement: {
183 enumerable: true, 183 enumerable: true,
184 get: function () { 184 get: function () {
185 return this._abcelement; 185 return this._colorelement;
186 }, 186 },
187 set: function (value) { 187 set: function (value) {
188 if (value !== this._abcelement) { 188 if (value !== this._colorelement) {
189 this._abcelement = value; 189 this._colorelement = value;
190 } 190 }
191 console.log(this._abcelement)
192 } 191 }
193 }, 192 },
194 193
@@ -375,13 +374,13 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, {
375 // setup fill color 374 // setup fill color
376 this._fillColorCtrl.props = { side: 'top', align: 'center', wheel: true, palette: true, gradient: false, image: false, nocolor: true, offset: -80 }; 375 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); 376 this.application.ninja.colorController.addButton("chip", this._fillColorCtrl);
378 this.abcelement = this._fillColorCtrl; 377 this.colorelement = this._fillColorCtrl;
379 var currentValue = ElementsMediator.getColor(this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.stageElement,this._isFill,this._borderSide) 378 var currentValue = ElementsMediator.getColor(this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.stageElement,this._isFill,this._borderSide)
379 this.application.ninja.timeline.selectedStyle = this.editorProperty;
380 this._fillColorCtrl.addEventListener("change", this.handleFillColorChange.bind(this), false); 380 this._fillColorCtrl.addEventListener("change", this.handleFillColorChange.bind(this), false);
381 this._fillColorCtrl.color(currentValue.colorMode, currentValue.color); 381 this._fillColorCtrl.color(currentValue.colorMode, currentValue.color);
382 this.addedColorChips = true; 382 this.addedColorChips = true;
383 } 383 }
384
385 // TODO: set up color chip here. 384 // TODO: set up color chip here.
386 } else if (tweenable.tweener === "input"){ 385 } else if (tweenable.tweener === "input"){
387 this.editorInputContainer.classList.remove("hidden"); 386 this.editorInputContainer.classList.remove("hidden");
@@ -706,26 +705,30 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, {
706 705
707 handleFillColorChange: { 706 handleFillColorChange: {
708 value: function (event) { 707 value: function (event) {
708
709 if(this.application.ninja.timeline.selectedStyle === "color" ||this.application.ninja.timeline.selectedStyle === this.editorProperty){
709 var fillColorObject={}; 710 var fillColorObject={};
710 fillColorObject.color=event._event.color; 711 fillColorObject.color=event._event.color;
711 fillColorObject.mode=event._event.colorMode; 712 fillColorObject.mode=event._event.colorMode;
712 ElementsMediator.setColor([this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.stageElement], fillColorObject, this._isFill, "Change", "timeline",null,this._borderSide) 713 ElementsMediator.setColor([this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.stageElement], fillColorObject, this._isFill, "Change", "timeline",null,this._borderSide)
713 714 }
714 } 715 }
715 }, 716 },
716 717
717 handleHottextChange:{ 718 handleHottextChange:{
718 value:function(event){ 719 value:function(event){
720 console.log(this.application.ninja.timeline.selectedStyle)
719 if(this.application.ninja.timeline.selectedStyle === this.editorProperty){ 721 if(this.application.ninja.timeline.selectedStyle === this.editorProperty){
720 this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.stageElement], this.editorProperty, [this.editorValue + event.target._units] , "Change", "pi"); 722 this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.stageElement], this.editorProperty, [this.editorValue + event.target._units] , "Change", "timeline");
721 } 723 }
722 } 724 }
723 }, 725 },
724 726
725 handleHottextChanging:{ 727 handleHottextChanging:{
726 value:function(event){ 728 value:function(event){
729 console.log(this.application.ninja.timeline.selectedStyle)
727 if(this.application.ninja.timeline.selectedStyle === this.editorProperty){ 730 if(this.application.ninja.timeline.selectedStyle === this.editorProperty){
728 this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.stageElement], this.editorProperty, [this.editorValue + event.target._units] , "Changing", "pi"); 731 this.application.ninja.elementMediator.setProperty([this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.stageElement], this.editorProperty, [this.editorValue + event.target._units] , "Changing", "timeline");
729 } 732 }
730 } 733 }
731 }, 734 },