Skip to content

Commit 02854f6

Browse files
authored
Merge pull request #2532 from adumesny/master
animation on init fix
2 parents 62a1fb8 + 5df0a0f commit 02854f6

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

doc/CHANGES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ Change log
108108
* fix [#2525](https://github.com/gridstack/gridstack.js/commit/2525) Fixed unhandled exception happening in _mouseMove handler
109109
* fix potential crash in doContentResize() if grid gets deleted by the time the delay happens
110110
* fix [#2527](https://github.com/gridstack/gridstack.js/issues/2527) Incorrect layout on grid load in one column mode
111+
* fix [#2496](https://github.com/gridstack/gridstack.js/issues/2496) animation on init, introduced in 8.1.1
111112

112113
## 9.5.0 (2023-10-26)
113114
* feat [#1275](https://github.com/gridstack/gridstack.js/issues/1275) div scale support - Thank you [elmehdiamlou](https://github.com/elmehdiamlou) for implementing this teh right way (add scale to current code)

src/gridstack.scss

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ $animation_speed: .3s !default;
4040
// make those more unique as to not conflict with side panel items
4141
.grid-stack > .grid-stack-item {
4242
position: absolute;
43-
top: 0px;
44-
left: 0%;
4543
padding: 0;
4644

4745
> .grid-stack-item-content {
@@ -138,6 +136,14 @@ $animation_speed: .3s !default;
138136
@include vendor(transition, left 0s, top 0s, height 0s, width 0s);
139137
}
140138

139+
// make those more unique as to not conflict with side panel items, but apply to all column layouts (so not in loop below)
140+
.grid-stack > .grid-stack-item[gs-y="0"] {
141+
top: 0px;
142+
}
143+
.grid-stack > .grid-stack-item[gs-x="0"] {
144+
left: 0%;
145+
}
146+
141147
.gs-#{$columns} > .grid-stack-item {
142148
width: fixed(calc(100% / $columns));
143149
@for $i from 1 through ($columns - 1) {

0 commit comments

Comments
 (0)