You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am trying to use ANIJS to animate add/remove of the widgets in the grid but for some reason this would not work. is there any event that gets triggered on add/remove?
the syntax is data-anijs="if: <event_name>, do: animated bounceIn"
@troolee Nothing special should be required to support anijs. By emitting an event for adding a widget and another for removing it, @crashnick16 should be able to get it working.
gridstack will now emit added and removed. I've successfully run a test. AniJS requires custom code be written for custom events, so I quickly wrote something up that worked okay:
Activity
troolee commentedon Feb 2, 2015
I will try to implement support of anijs
radiolips commentedon Feb 20, 2016
@troolee Nothing special should be required to support anijs. By emitting an event for adding a widget and another for removing it, @crashnick16 should be able to get it working.
troolee commentedon Feb 20, 2016
it could be some issues with animations delay. Needs to be checked
gridstack#54 - Added added and removed events.
radiolips commentedon Feb 23, 2016
gridstack will now emit
addedandremoved. I've successfully run a test. AniJS requires custom code be written for custom events, so I quickly wrote something up that worked okay:and the data-ani-js:
data-anijs="if: removed, do: swing animated, on: $gridstack"This will
swing animatedwhen a widget is removed. By changingremovedtoadded, it'll fire on widgets added. Let me know if you need further help!troolee commentedon Feb 23, 2016
@radiolips, could you please make a note about AniJS support in README.md?
radiolips commentedon Feb 23, 2016
Absolutely! I'm putting a demo together currently.
AK1979 commentedon Mar 16, 2017
Hi
I'm trying to add animation when the widget is closed but the 'removed' event is fired when the widget is not on the DOM.
Can you please attach working example of the removed animation ?
Regards,
Arie.