@grafloria/element 0.4.38 → 0.4.39
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
|
@@ -1038,7 +1038,15 @@ export function createDashboardHandle(ctx) {
|
|
|
1038
1038
|
if (!model || !from || !pg || !pageSpec)
|
|
1039
1039
|
return null;
|
|
1040
1040
|
const viewId = (_c = ctx.viewOfBoard.get(containerId)) !== null && _c !== void 0 ? _c : ctx.active;
|
|
1041
|
-
|
|
1041
|
+
// The new group's id. `${pageId}__group` is the usual — but when the page
|
|
1042
|
+
// is leaving the very group that was BORN from it (torn out twice), that
|
|
1043
|
+
// id is still taken until the emptied group closes later in the same
|
|
1044
|
+
// batch: AddGroup threw "already exists" mid-batch, the split preview
|
|
1045
|
+
// stayed applied and the chip stayed on screen (0.4.39). Take the next
|
|
1046
|
+
// free suffix instead.
|
|
1047
|
+
let W = `${pageId}__group`;
|
|
1048
|
+
for (let n = 2; model.getGroup(W) || ctx.boardGroups.has(W); n++)
|
|
1049
|
+
W = `${pageId}__group${n}`;
|
|
1042
1050
|
const tabsOpts = (_d = ctx.tabsOf.get(containerId)) !== null && _d !== void 0 ? _d : {};
|
|
1043
1051
|
const label = (_e = pageSpec.title) !== null && _e !== void 0 ? _e : pageId;
|
|
1044
1052
|
const size = { width: (_g = (_f = pg.size) === null || _f === void 0 ? void 0 : _f.width) !== null && _g !== void 0 ? _g : 0, height: ((_j = (_h = pg.size) === null || _h === void 0 ? void 0 : _h.height) !== null && _j !== void 0 ? _j : 0) + tabStripReserve(tabsOpts, 1) };
|