Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 383a1d9

Browse files
Merge pull request gridstack#3049 from adumesny/master
more `opts.animate`
2 parents 5deef08 + 653e98d commit 383a1d9

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

‎doc/CHANGES.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Change log
129129

130130
## 12.1.1-dev (TBD)
131131
* fix [#3043](https://github.com/gridstack/gridstack.js/issues/3043) fix `opts.animate` again
132-
* fix [#3047](https://github.com/gridstack/gridstack.js/pull/3047) nested grid resizeToContentCBCheck() fix
132+
* fix [#3048](https://github.com/gridstack/gridstack.js/pull/3048) nested grid resizeToContentCBCheck() fix
133133

134134

135135
## 12.1.1 (2024年04月28日)

‎src/gridstack.ts‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2251,9 +2251,11 @@ export class GridStack {
22512251
delete this.placeholder.gridstackNode;
22522252

22532253
// disable animation when replacing a placeholder (already positioned) with actual content
2254-
const noAnim = wasAdded && this.opts.animate;
2255-
if (noAnim) this.setAnimation(false);
2256-
2254+
if (wasAdded && this.opts.animate) {
2255+
this.setAnimation(false);
2256+
this.setAnimation(true, true); // delay adding back
2257+
}
2258+
22572259
// notify previous grid of removal
22582260
// console.log('drop delete _gridstackNodeOrig') // TEST
22592261
const origNode = el._gridstackNodeOrig;
@@ -2314,9 +2316,6 @@ export class GridStack {
23142316
this._gsEventHandler['dropped']({ ...event, type: 'dropped' }, origNode && origNode.grid ? origNode : undefined, node);
23152317
}
23162318

2317-
// delay adding animation back
2318-
if (noAnim) this.setAnimation(this.opts.animate, true);
2319-
23202319
return false; // prevent parent from receiving msg (which may be grid as well)
23212320
});
23222321
return this;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /