Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable animation on init #2496

Closed
bad-shape-guy opened this issue Oct 9, 2023 · 6 comments · Fixed by #2532 · May be fixed by Samg217/glpi#8
Closed

Disable animation on init #2496

bad-shape-guy opened this issue Oct 9, 2023 · 6 comments · Fixed by #2532 · May be fixed by Samg217/glpi#8
Labels

Comments

@bad-shape-guy
Copy link

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

@adumesny
Copy link
Member

adumesny commented Oct 9, 2023

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

@bad-shape-guy
Copy link
Author

bad-shape-guy commented Oct 10, 2023

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 :/

@adumesny
Copy link
Member

adumesny commented Oct 11, 2023

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

@JakubEleniuk
Copy link
Contributor

Can be fixed by removing this line

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

@adumesny
Copy link
Member

adumesny commented Nov 5, 2023

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.

adumesny added a commit to adumesny/gridstack.js that referenced this issue Nov 11, 2023
* fix gridstack#2496
* fix animation on init, introduced in 8.1.1
@adumesny adumesny mentioned this issue Nov 11, 2023
3 tasks
@adumesny
Copy link
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
Labels
Projects
None yet
3 participants