diff options
Diffstat (limited to 'js/panels/Timeline/Style.reel')
-rw-r--r-- | js/panels/Timeline/Style.reel/Style.js | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/js/panels/Timeline/Style.reel/Style.js b/js/panels/Timeline/Style.reel/Style.js index d712f2bd..fa848cc0 100644 --- a/js/panels/Timeline/Style.reel/Style.js +++ b/js/panels/Timeline/Style.reel/Style.js | |||
@@ -222,7 +222,6 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { | |||
222 | value: function(event) { | 222 | value: function(event) { |
223 | // this should be handled via binding, but somehow is not. Setting manually for now. | 223 | // this should be handled via binding, but somehow is not. Setting manually for now. |
224 | this.editorProperty = this.myHintable.value; | 224 | this.editorProperty = this.myHintable.value; |
225 | |||
226 | // Change views. | 225 | // Change views. |
227 | this.whichView = "propval"; | 226 | this.whichView = "propval"; |
228 | } | 227 | } |
@@ -304,6 +303,9 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { | |||
304 | this.valueEditorHottext.units = tweenable.units; | 303 | this.valueEditorHottext.units = tweenable.units; |
305 | this.valueEditorHottext.minValue = tweenable.min; | 304 | this.valueEditorHottext.minValue = tweenable.min; |
306 | this.valueEditorHottext.maxValue = tweenable.max; | 305 | this.valueEditorHottext.maxValue = tweenable.max; |
306 | this.valueEditorHottext.identifier="hottext" | ||
307 | this.valueEditorHottext.addEventListener("change",this,false); | ||
308 | this.valueEditorHottext.addEventListener("changing",this,false); | ||
307 | this.valueEditorHottext.needsDraw = true; | 309 | this.valueEditorHottext.needsDraw = true; |
308 | } else if (tweenable.tweener === "color" ) { | 310 | } else if (tweenable.tweener === "color" ) { |
309 | this.editorInputContainer.classList.add("hidden"); | 311 | this.editorInputContainer.classList.add("hidden"); |
@@ -315,6 +317,7 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { | |||
315 | this.editorColorContainer.classList.add("hidden"); | 317 | this.editorColorContainer.classList.add("hidden"); |
316 | this.editorHottextContainer.classList.add("hidden"); | 318 | this.editorHottextContainer.classList.add("hidden"); |
317 | this.valueEditorInput.value = this.editorValue; | 319 | this.valueEditorInput.value = this.editorValue; |
320 | this.valueEditorInput.addEventListener("blur",this,false); | ||
318 | } else { | 321 | } else { |
319 | this.log("Warning: unknown tweenable -"+tweenable.tweener+"- specified in style.js.") | 322 | this.log("Warning: unknown tweenable -"+tweenable.tweener+"- specified in style.js.") |
320 | } | 323 | } |
@@ -558,7 +561,7 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { | |||
558 | { | 561 | { |
559 | "property" : "opacity", | 562 | "property" : "opacity", |
560 | "tweener" : "hottext", | 563 | "tweener" : "hottext", |
561 | "units" : "%", | 564 | "units" : "", |
562 | "min" : 0, | 565 | "min" : 0, |
563 | "max" : 100, | 566 | "max" : 100, |
564 | "default" : 100 | 567 | "default" : 100 |
@@ -614,6 +617,33 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { | |||
614 | ] | 617 | ] |
615 | 618 | ||
616 | }, | 619 | }, |
620 | |||
621 | handleHottextChange:{ | ||
622 | value:function(event){ | ||
623 | |||
624 | if(this.editorValue===""){ | ||
625 | this.editorValue = 0; | ||
626 | } | ||
627 | this.application.ninja.elementMediator.setProperty(this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.elementsList, this.editorProperty, [this.editorValue + event.target._units] , "Change", "timeline"); | ||
628 | } | ||
629 | }, | ||
630 | |||
631 | handleHottextChanging:{ | ||
632 | value:function(event){ | ||
633 | |||
634 | if(this.editorValue===""){ | ||
635 | this.editorValue = 0; | ||
636 | } | ||
637 | this.application.ninja.elementMediator.setProperty(this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.elementsList, this.editorProperty, [this.editorValue + event.target._units ] , "Changing", "timeline"); | ||
638 | } | ||
639 | }, | ||
640 | |||
641 | handleBlur:{ | ||
642 | value:function(event){ | ||
643 | this.application.ninja.elementMediator.setProperty(this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.elementsList, this.editorProperty, [event.target.value] , "Change", "timeline"); | ||
644 | } | ||
645 | }, | ||
646 | |||
617 | 647 | ||
618 | /* Begin: Logging routines */ | 648 | /* Begin: Logging routines */ |
619 | _boolDebug: { | 649 | _boolDebug: { |