@@ -39,10 +39,10 @@ render_action(Record) ->
3939 'toggle' when Effect == none ->
4040 [" toggle(" , ActionsFun , " );" ];
4141 'appear' ->
42- if_visible ( Actions , [wf :f (" $(this).fadeIn( ~p , " , [Speed ]), ActionsFun , " ); " ]) ;
42+ { raw , [wf :f (" document.querySelectorAll(' ~s ') " , [Target ]), " .forEach(node => { node.classList.remove('n2-effect-fade'); node.classList.add('n2-effect', 'n2-effect-appear'); } ) " ]} ;
4343 'fade' ->
44- if_visible ( [wf :f (" $(this).fadeOut( ~p , " , [Speed ]), ActionsFun , " ); " ], Actions ) ;
45- 'slideup' ->
44+ { raw , [wf :f (" document.querySelectorAll(' ~s ') " , [Target ]), " .forEach(node => { node.classList.remove('n2-effect-appear'); node.classList.add('n2-effect', 'n2-effect-fade'); } ) " ]} ;
45+ 'slideup' ->
4646 if_visible ([wf :f (" $(this).slideUp(~p , " ,[Speed ]), ActionsFun , " );" ], Actions );
4747 'slidedown' ->
4848 if_visible (Actions , [wf :f (" $(this).slideDown(~p , " ,[Speed ]), ActionsFun , " );" ]);
@@ -65,7 +65,12 @@ render_action(Record) ->
6565 'animate' ->
6666 [wf :f (" animate(~s , ~p , '~s ', " , [Options , Speed , Easing ]), ActionsFun , " );" ]
6767 end ,
68- [wf :f (" objs('~s ')." , [Target ]), Script ].
68+ R = case Script of
69+ {raw , S } -> S ;
70+ S -> [wf :f (" objs('~s ')." , [Target ]), Script ]
71+ end ,
72+ io :format (" Effect: ~p~n " , [R ]),
73+ R .
6974
7075execute_actions_fun (" null" ) ->
7176 " " ;
0 commit comments