Skip to content

Disable animation on init #2496

Closed
Samg217/glpi
#8

Description

@bad-shape-guy

Good afternoon, I recently updated my version from a fairly old one to a new one, and noticed that now when the page is initialized, it's as if all the widgets are in zero coordinates and move to their place with animation

Here you can observe this effect:
https://gridstackjs.com/demo/nested.html

Of course you can disable it with the "animate" parameter, but in this way all animation will be disabled, when dragging, resizing, etc.

The feeling that this did not happen before, i.e. there was animation when moving and changing, but it was not there when initializing, and all widgets were immediately in their place when loading

Please tell me how you can solve my problem. Thanks

Activity

  1. adumesny commented on Oct 9, 2023

    @adumesny
    Member

    yeah noticed that as well recently. not sure when it started...

  2. bad-shape-guy commented on Oct 10, 2023

    @bad-shape-guy
    Author

    I think the problem is between releases 8.1.0 and 8.1.1

    .grid-stack > .grid-stack-item { position: absolute; top: 0px; left: 0%; padding: 0; }

    Attributes top and left break the display of widgets

    Although, if you remove these attributes, the animation disappears completely :/

  3. adumesny commented on Oct 11, 2023

    @adumesny
    Member

    8.1.1 had a tons of CSS changes #2315 and likely side affect - thanks for narrowing it down the build #
    but yeah think this is the issue
    image

  4. JakubEleniuk commented on Nov 4, 2023

    @JakubEleniuk
    Contributor

    Can be fixed by removing this line

    @include vendor(transition, left $animation_speed, top $animation_speed, height $animation_speed, width $animation_speed);

  5. adumesny commented on Nov 5, 2023

    @adumesny
    Member

    no that removes the entire animation for everything. the problem is on init - maybe fix is to delay setting animation style on the grid until after init... not sure what 8.1.1 change broke this.

  6. added a commit that references this issue on Nov 11, 2023
    5df0a0f
  7. adumesny commented on Nov 11, 2023

    @adumesny
    Member

    fixed in next release. don't forget to donate if you find this lib useful!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions