@@ -46,7 +46,7 @@ var TimePanel = (function(){
4646 ry : { name :"ry" , "class" :"prop-label" , type :"number" , anim :true } , // (number)
4747 text : { name :"text" , "class" :"prop-label" , type :"textarea" } , // (string) contents of the text element. Use '\n' for multiline text
4848 "text-anchor" :{ name :"text-anchor" , "class" :"prop-label" , type :"select" , options :[ "start" , "middle" , "end" ] } , // (string) ["start", "middle", "end"], default is "middle"
49- "opacity" :{ name :"opacity" , "class" :"prop-label" , type :"percent" , max :100 , anim :true } , // (number)
49+ "opacity" :{ name :"opacity" , "class" :"prop-label" , type :"percent" , min : 0 , max :100 , anim :true } , // (number)
5050 "fill" :{ name :"fill" , label :"fill" , "class" :"prop-label" , width :100 , wh : 10 , colorRight :20 , lebelRight :50 , type :"color" , anim :true } , // (string) colour, gradient or image
5151 //"fill-opacity":{name:"fill-opacity", type:"percent"}, // (number)
5252 "stroke" :{ name :"stroke" , label :"stroke" , "class" :"prop-label" , width :100 , wh : 10 , colorRight :20 , lebelRight :50 , type :"color" , anim :true } , // (string) stroke colour
@@ -416,6 +416,7 @@ var TimePanel = (function(){
416416 b . push ( obj . timeline ) ;
417417
418418 Object . each ( el . anims , function ( p , k ) {
419+ if ( k === "transform" ) { return ; } //skip hidden transform proprety
419420 $$ (
420421 obj . tProps [ k ] ,
421422 obj . eProps [ k ] . getParent ( ) ,
@@ -525,6 +526,7 @@ var TimePanel = (function(){
525526 * @return (div) the div representing the row
526527 */
527528 elementCreate : function ( el ) {
529+ if ( el . type === "set" ) return { } ;
528530 var div = this . div , img = this . img , imgSrc = this . imgSrc , msPerpx = this . msPerpx ,
529531 color = el . color = el . color || Raphael . getColor ( 0.9 ) ,
530532 type = el . type ,
@@ -617,9 +619,12 @@ var TimePanel = (function(){
617619 return ;
618620 }
619621 if ( prop === "path" ) {
620- //TODO
622+ el . drawing && el . plug ( ) ;
621623 return ;
622624 }
625+ if ( p . hasClass ( "percent" ) ) {
626+ p . getLast ( 'input' ) . set ( "value" , ( val *= 100 ) . round ( ) ) ;
627+ }
623628 //console.log(p, prop, el.attr(prop));
624629 p . getLast ( 'input' ) . set ( "value" , val ) ;
625630
@@ -785,11 +790,8 @@ var TimePanel = (function(){
785790 */
786791 setLastMs : function ( ) {
787792 var ms = 0
788- Object . each ( this . els , function ( elm ) {
789- Object . each ( elm . el . anims , function ( p ) {
790- if ( p . length === 0 ) return ;
791- ms = ms . max ( p [ p . length - 1 ] . ms ) ;
792- } ) ;
793+ Object . each ( this . animating , function ( elm ) {
794+ ms = elm . anim . ms ;
793795 } ) ;
794796 this . lastMs = ms ;
795797 } ,
@@ -892,8 +894,9 @@ var TimePanel = (function(){
892894 clearTimeout ( this . timer ) ;
893895 this . playButton . attr ( "path" , this . icon . play ) ;
894896 Object . each ( this . animating , function ( el ) {
895- el . ft . showHandles ( ) ;
896- //TODO add path guid hide
897+ ! ( el . type === "path" && el . drawing ) && el . ft . showHandles ( ) ;
898+ //console.log(el.aimating.contains("path"));
899+ if ( el . type === "path" && el . drawing ) { el . plug ( ) ; }
897900 window . fireEvent ( "panel.element.update" , [ el . trans ( el . animating ) , el ] ) ;
898901 } , this ) ;
899902 } ,
@@ -916,6 +919,7 @@ var TimePanel = (function(){
916919 //hide elements properties and guid tools
917920 Object . each ( this . animating , function ( el ) {
918921 el . ft . hideHandles ( ) ;
922+ if ( el . type == "path" && el . drawing ) { el . hideManager ( ) ; }
919923 window . fireEvent ( "panel.element.update" , [ 'clear' , el ] ) ;
920924 } , this ) ;
921925 this . playButton . attr ( "path" , this . icon . stop ) ;
@@ -1236,6 +1240,7 @@ var TimePanel = (function(){
12361240 } ) ;
12371241
12381242 el . anim = Raphael . animation ( nanims , lastMs ) ;
1243+
12391244 console . log ( "combinAnim" , anims , nanims , mss ) ;
12401245 return el ;
12411246 } ,
@@ -1488,10 +1493,10 @@ var TimePanel = (function(){
14881493 el . destroy ( ) ;
14891494 if ( anims . length === 0 ) {
14901495 $$ ( elm . tProps [ prop ] , elm . eProps [ prop ] . getParent ( ) ) . addClass ( 'empty' ) ;
1491- el . animating . erace ( prop ) ;
1496+ el . animating . erase ( prop ) ;
14921497 if ( Object . every ( elm . tProps , function ( p ) { return p . hasClass ( 'empty' ) ; } ) ) {
14931498 $$ ( elm . element , elm . timeline ) . addClass ( "empty" ) ;
1494- this . animating . erace ( el ) ;
1499+ this . animating . erase ( el ) ;
14951500 delete elm . el . anim ;
14961501 return ;
14971502 }
@@ -1633,14 +1638,14 @@ var TimePanel = (function(){
16331638 elm . status ( anim , ( trackerMs - del ) / ( anim . ms - del ) ) ;
16341639 window . fireEvent ( "panel.element.update" , [ elm . trans ( prop ) , elm ] ) ;
16351640 }
1636- ( ! next ) && this . fireEvent ( "timeline.lastMs" ) ;
16371641 } . bind ( this ) ,
16381642 mouseup = function ( ) {
16391643
16401644 window . removeEvent ( "mousemove" , mousemove ) ;
16411645 window . removeEvent ( "mouseup" , mouseup ) ;
16421646
16431647 this . combineAnim ( elm ) ;
1648+ ( ! next ) && this . fireEvent ( "timeline.lastMs" ) ; //update lastMs
16441649 if ( isKey ) { document . body . style . cursor = "default" ; }
16451650 document . onselectstart = function ( ) { return true ; } ;
16461651 } . bind ( this ) ,
0 commit comments