Use npm for gridstack, remove unnecessary folders using our dedicated service

This commit is contained in:
Stephen Abello
2026-01-09 15:07:34 +01:00
parent 1538596db8
commit 7b193dd737
134 changed files with 405 additions and 15344 deletions

View File

@@ -1,5 +1,5 @@
/**
* gridstack-engine.ts 12.3.2
* gridstack-engine.ts 12.4.2
* Copyright (c) 2021-2025 Alain Dumesny - see GridStack root license
*/
import { Utils } from './utils';
@@ -1078,14 +1078,20 @@ class GridStackEngine {
// TODO: detect doing item 'swaps' will help instead of move (especially in 1 column mode)
if (n.y >= 0 && node.y !== node._orig.y) {
n.y += (node.y - node._orig.y);
if (n.y < 0)
n.y = 0;
}
// X changed, scale from new position
if (node.x !== node._orig.x) {
n.x = Math.round(node.x * ratio);
if (n.x < 0)
n.x = 0;
}
// width changed, scale from new width
if (node.w !== node._orig.w) {
n.w = Math.round(node.w * ratio);
if (n.w < 1)
n.w = 1;
}
// ...height always carries over from cache
});