Skip to content

ANIJS not working with widgets #54

Closed

Description

@crashnick16

Hi,

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"

thanks,
Nick

Activity

  1. troolee commented on Feb 2, 2015

    @troolee
    Member

    I will try to implement support of anijs

  2. added this to the v0.2.3 milestone on Feb 2, 2015
  3. modified the milestones: v0.2.4, v0.2.3 on Mar 4, 2015
  4. modified the milestones: v0.2.4, v0.2.5 on Feb 15, 2016
  5. radiolips commented on Feb 20, 2016

    @radiolips
    Member

    @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.

  6. troolee commented on Feb 20, 2016

    @troolee
    Member

    it could be some issues with animations delay. Needs to be checked

  7. added a commit that references this issue on Feb 23, 2016
  8. radiolips commented on Feb 23, 2016

    @radiolips
    Member

    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:

                    AniJS.run();
                    self.gridstackNotifier = AniJS.getNotifier('gridstack');
                    $('.grid-stack').on('removed', function(event, items) {
                        self.gridstackNotifier.dispatchEvent('removed');
                    });
    

    and the data-ani-js:
    data-anijs="if: removed, do: swing animated, on: $gridstack"

    This will swing animated when a widget is removed. By changing removed to added, it'll fire on widgets added. Let me know if you need further help!

  9. troolee commented on Feb 23, 2016

    @troolee
    Member

    @radiolips, could you please make a note about AniJS support in README.md?

  10. radiolips commented on Feb 23, 2016

    @radiolips
    Member

    Absolutely! I'm putting a demo together currently.

  11. AK1979 commented on Mar 16, 2017

    @AK1979

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions