From fdc4f5c7f81ae3b9adeca2232e60268b4be594a2 Mon Sep 17 00:00:00 2001 From: Kruti Shah Date: Tue, 22 May 2012 15:32:42 -0700 Subject: Style Layer Control Signed-off-by: Kruti Shah --- js/panels/Timeline/Style.reel/Style.js | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'js') diff --git a/js/panels/Timeline/Style.reel/Style.js b/js/panels/Timeline/Style.reel/Style.js index 91abaa71..532982f7 100644 --- a/js/panels/Timeline/Style.reel/Style.js +++ b/js/panels/Timeline/Style.reel/Style.js @@ -316,6 +316,7 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { this.editorColorContainer.classList.add("hidden"); this.editorHottextContainer.classList.add("hidden"); this.valueEditorInput.value = this.editorValue; + this.valueEditorInput.addEventListener("blur",this,false); } else { this.log("Warning: unknown tweenable -"+tweenable.tweener+"- specified in style.js.") } @@ -559,7 +560,7 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { { "property" : "opacity", "tweener" : "hottext", - "units" : "%", + "units" : "", "min" : 0, "max" : 100, "default" : 100 @@ -617,19 +618,31 @@ var LayerStyle = exports.LayerStyle = Montage.create(Component, { }, handleHottextChange:{ - value:function(){ - debugger; - this.application.ninja.elementMediator.setProperty(this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.elementsList, this.editorProperty, [this.editorValue + "%"] , "Change", "timeline"); + value:function(event){ + + if(this.editorValue===""){ + this.editorValue = 0; + } + this.application.ninja.elementMediator.setProperty(this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.elementsList, this.editorProperty, [this.editorValue + event.target._units] , "Change", "timeline"); } }, handleHottextChanging:{ - value:function(){ + value:function(event){ + + if(this.editorValue===""){ + this.editorValue = 0; + } + this.application.ninja.elementMediator.setProperty(this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.elementsList, this.editorProperty, [this.editorValue + event.target._units ] , "Changing", "timeline"); + } + }, - debugger; - this.application.ninja.elementMediator.setProperty(this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.elementsList, this.editorProperty, [this.editorValue + "%"] , "Changing", "timeline"); + handleBlur:{ + value:function(event){ + this.application.ninja.elementMediator.setProperty(this.parentComponent.parentComponent.parentComponent.parentComponent.layerData.elementsList, this.editorProperty, [event.target.value] , "Change", "timeline"); } }, + /* Begin: Logging routines */ _boolDebug: { -- cgit v1.2.3