Closed colintucker closed 7 years ago
Hmm, I just noticed a problem in my testing with an undefined animation data attribute, I'll update the branch with a fix.
Nice one! I'll have a look at this. I was actually thinking recently that the toggling is a bit jarring!
Okie dokes, I think that fixed the attribute bug. As a bonus, I also added config for the default animation method, which can be set in the YAML, or via:
DisplayLogicCriteria::set_default_animation('fade');
That way, you won't need to use ->useAnimation('fade')
on everything if you like that animation.
Hey UC!
I started using your handy module today for a project and I felt inspired to add some animation effects. These are just regular old-fashioned jQuery animations, nothing special. I've added a method to
DisplayLogicCriteria
calleduseAnimation()
. It works like so:The default animation method is
toggle
ifuseAnimation
is not called (i.e. the default display logic behaviour). My JavaScript is not the best so hopefully you can review that and see if I've done anything silly, though it seems to work. 😜I hope the PR can be of some benefit! 😃
Cheers,
Colin.