@grafloria/element 0.4.15 → 0.4.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafloria/element",
3
- "version": "0.4.15",
3
+ "version": "0.4.16",
4
4
  "type": "module",
5
5
  "main": "./src/index.js",
6
6
  "types": "./src/index.d.ts",
@@ -1375,7 +1375,18 @@ export function bindDashboardGrid(api, group, options = {}) {
1375
1375
  // the strip's CURRENT slab rows, whatever gesture created them; the
1376
1376
  // ledger just accumulates this gesture's net change for the one-batch
1377
1377
  // commit and for Escape.
1378
- if (maxRows !== undefined && escalate && g.kind === 'resize') {
1378
+ // ESCALATION SCALES THE WHOLE STRIP every tile inside taller together
1379
+ // (s21, the model the user agreed on for a KPI strip). That is only sane
1380
+ // when the pulled tile spans the strip's full height, which every tile of
1381
+ // a one-row strip does. A partial-height tile in a MULTI-ROW section
1382
+ // resizes within the section and is refused past its rows: the first
1383
+ // version compared the tile's height with the whole section and shrank a
1384
+ // 14-row control panel to 4 rows under a 150-px pull on a one-row
1385
+ // drop-down (Quantia, Groups page — "boom its destroyed"). And a section
1386
+ // never shrinks below its designed rows.
1387
+ const pulled = engine.getItem(g.id);
1388
+ const spansStrip = !!pulled && pulled.y === 0 && pulled.h >= (maxRows !== null && maxRows !== void 0 ? maxRows : Infinity);
1389
+ if (maxRows !== undefined && escalate && spansStrip && g.kind === 'resize') {
1379
1390
  const parent = parentPeer();
1380
1391
  if (parent) {
1381
1392
  const visual = boardVisualHeight();
@@ -1402,7 +1413,7 @@ export function bindDashboardGrid(api, group, options = {}) {
1402
1413
  if (h > visual + 24) {
1403
1414
  record(parent.resizeMemberBy(group.id, +1), +1);
1404
1415
  }
1405
- else if (slabRows > 1 && h < visual - rowPx * 0.7) {
1416
+ else if (slabRows > Math.max(1, maxRows) && h < visual - rowPx * 0.7) {
1406
1417
  record(parent.resizeMemberBy(group.id, -1), -1);
1407
1418
  }
1408
1419
  }