microboard-temp 0.4.45 → 0.4.47
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/dist/cjs/browser.js +10 -6
- package/dist/cjs/index.js +10 -6
- package/dist/cjs/node.js +10 -6
- package/dist/esm/browser.js +10 -6
- package/dist/esm/index.js +10 -6
- package/dist/esm/node.js +10 -6
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -43750,6 +43750,7 @@ class NestingHighlighter extends Tool {
|
|
|
43750
43750
|
frameRect.render(context);
|
|
43751
43751
|
}
|
|
43752
43752
|
group.children.forEach((child) => {
|
|
43753
|
+
child.render(context);
|
|
43753
43754
|
const childRect = child.getMbr();
|
|
43754
43755
|
childRect.backgroundColor = FRAME_CHILDREN_HIGHLIGHTER_COLOR;
|
|
43755
43756
|
childRect.borderColor = FRAME_CHILDREN_HIGHLIGHTER_BORDER_COLOR;
|
|
@@ -45590,7 +45591,7 @@ class AlignmentHelper {
|
|
|
45590
45591
|
const cameraWidth = camera.getWidth();
|
|
45591
45592
|
const scale = this.board.camera.getScale();
|
|
45592
45593
|
const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
|
|
45593
|
-
const childrenIds =
|
|
45594
|
+
const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
|
|
45594
45595
|
const nearbyItems = this.canvasDrawer.getLastCreatedCanvas() ? this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (item) => !excludeItems.includes(item), Math.ceil(cameraWidth)) : this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (otherItem) => otherItem !== movingMBR && otherItem.itemType !== "Connector" && otherItem.itemType !== "Drawing" && otherItem.isInView(camera) && !childrenIds.includes(otherItem.getId()), Math.ceil(cameraWidth)).filter((item) => Array.isArray(movingItem) ? !movingItem.includes(item) : true);
|
|
45595
45596
|
const verticalAlignments = new Map;
|
|
45596
45597
|
const horizontalAlignments = new Map;
|
|
@@ -46495,10 +46496,13 @@ class Select extends Tool {
|
|
|
46495
46496
|
const isNotInSelection = this.board.selection.items.findById(underPointer.getId()) === null;
|
|
46496
46497
|
if (isNotInSelection) {
|
|
46497
46498
|
this.board.selection.add(underPointer);
|
|
46498
|
-
if (underPointer
|
|
46499
|
+
if ("index" in underPointer && underPointer.index) {
|
|
46499
46500
|
const { left, right, top, bottom } = underPointer.getMbr();
|
|
46500
|
-
const
|
|
46501
|
-
|
|
46501
|
+
const childrenIds = underPointer.getChildrenIds();
|
|
46502
|
+
if (childrenIds) {
|
|
46503
|
+
const itemsInFrame = this.board.items.getEnclosedOrCrossed(left, top, right, bottom).filter((item) => childrenIds.includes(item.getId()));
|
|
46504
|
+
this.board.selection.add(itemsInFrame);
|
|
46505
|
+
}
|
|
46502
46506
|
}
|
|
46503
46507
|
this.board.selection.setContext("EditUnderPointer");
|
|
46504
46508
|
} else {
|
|
@@ -51993,7 +51997,7 @@ class BoardSelection {
|
|
|
51993
51997
|
const startItemId = startPoint.pointType !== "Board" ? startPoint.item.getId() : null;
|
|
51994
51998
|
const endItemId = endPoint.pointType !== "Board" ? endPoint.item.getId() : null;
|
|
51995
51999
|
const single = this.items.getSingle();
|
|
51996
|
-
const frameChild = single instanceof
|
|
52000
|
+
const frameChild = single instanceof BaseItem && single.index ? single.getChildrenIds() : null;
|
|
51997
52001
|
const hasStartItem = startItemId && !this.items.findById(startItemId) && !frameChild?.some((child) => child === startItemId);
|
|
51998
52002
|
const hasEndItem = endItemId && !this.items.findById(endItemId) && !frameChild?.some((child) => child === endItemId);
|
|
51999
52003
|
if (hasStartItem) {
|
|
@@ -52244,7 +52248,7 @@ class BoardSelection {
|
|
|
52244
52248
|
};
|
|
52245
52249
|
}
|
|
52246
52250
|
function tryToAddFrameChildrenToTranslation(selectedItem) {
|
|
52247
|
-
if (!("index" in selectedItem)
|
|
52251
|
+
if (!("index" in selectedItem) || !selectedItem.index) {
|
|
52248
52252
|
return;
|
|
52249
52253
|
}
|
|
52250
52254
|
for (const childId of selectedItem.getChildrenIds()) {
|
package/dist/cjs/index.js
CHANGED
|
@@ -43750,6 +43750,7 @@ class NestingHighlighter extends Tool {
|
|
|
43750
43750
|
frameRect.render(context);
|
|
43751
43751
|
}
|
|
43752
43752
|
group.children.forEach((child) => {
|
|
43753
|
+
child.render(context);
|
|
43753
43754
|
const childRect = child.getMbr();
|
|
43754
43755
|
childRect.backgroundColor = FRAME_CHILDREN_HIGHLIGHTER_COLOR;
|
|
43755
43756
|
childRect.borderColor = FRAME_CHILDREN_HIGHLIGHTER_BORDER_COLOR;
|
|
@@ -45590,7 +45591,7 @@ class AlignmentHelper {
|
|
|
45590
45591
|
const cameraWidth = camera.getWidth();
|
|
45591
45592
|
const scale = this.board.camera.getScale();
|
|
45592
45593
|
const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
|
|
45593
|
-
const childrenIds =
|
|
45594
|
+
const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
|
|
45594
45595
|
const nearbyItems = this.canvasDrawer.getLastCreatedCanvas() ? this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (item) => !excludeItems.includes(item), Math.ceil(cameraWidth)) : this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (otherItem) => otherItem !== movingMBR && otherItem.itemType !== "Connector" && otherItem.itemType !== "Drawing" && otherItem.isInView(camera) && !childrenIds.includes(otherItem.getId()), Math.ceil(cameraWidth)).filter((item) => Array.isArray(movingItem) ? !movingItem.includes(item) : true);
|
|
45595
45596
|
const verticalAlignments = new Map;
|
|
45596
45597
|
const horizontalAlignments = new Map;
|
|
@@ -46495,10 +46496,13 @@ class Select extends Tool {
|
|
|
46495
46496
|
const isNotInSelection = this.board.selection.items.findById(underPointer.getId()) === null;
|
|
46496
46497
|
if (isNotInSelection) {
|
|
46497
46498
|
this.board.selection.add(underPointer);
|
|
46498
|
-
if (underPointer
|
|
46499
|
+
if ("index" in underPointer && underPointer.index) {
|
|
46499
46500
|
const { left, right, top, bottom } = underPointer.getMbr();
|
|
46500
|
-
const
|
|
46501
|
-
|
|
46501
|
+
const childrenIds = underPointer.getChildrenIds();
|
|
46502
|
+
if (childrenIds) {
|
|
46503
|
+
const itemsInFrame = this.board.items.getEnclosedOrCrossed(left, top, right, bottom).filter((item) => childrenIds.includes(item.getId()));
|
|
46504
|
+
this.board.selection.add(itemsInFrame);
|
|
46505
|
+
}
|
|
46502
46506
|
}
|
|
46503
46507
|
this.board.selection.setContext("EditUnderPointer");
|
|
46504
46508
|
} else {
|
|
@@ -51993,7 +51997,7 @@ class BoardSelection {
|
|
|
51993
51997
|
const startItemId = startPoint.pointType !== "Board" ? startPoint.item.getId() : null;
|
|
51994
51998
|
const endItemId = endPoint.pointType !== "Board" ? endPoint.item.getId() : null;
|
|
51995
51999
|
const single = this.items.getSingle();
|
|
51996
|
-
const frameChild = single instanceof
|
|
52000
|
+
const frameChild = single instanceof BaseItem && single.index ? single.getChildrenIds() : null;
|
|
51997
52001
|
const hasStartItem = startItemId && !this.items.findById(startItemId) && !frameChild?.some((child) => child === startItemId);
|
|
51998
52002
|
const hasEndItem = endItemId && !this.items.findById(endItemId) && !frameChild?.some((child) => child === endItemId);
|
|
51999
52003
|
if (hasStartItem) {
|
|
@@ -52244,7 +52248,7 @@ class BoardSelection {
|
|
|
52244
52248
|
};
|
|
52245
52249
|
}
|
|
52246
52250
|
function tryToAddFrameChildrenToTranslation(selectedItem) {
|
|
52247
|
-
if (!("index" in selectedItem)
|
|
52251
|
+
if (!("index" in selectedItem) || !selectedItem.index) {
|
|
52248
52252
|
return;
|
|
52249
52253
|
}
|
|
52250
52254
|
for (const childId of selectedItem.getChildrenIds()) {
|
package/dist/cjs/node.js
CHANGED
|
@@ -46223,6 +46223,7 @@ class NestingHighlighter extends Tool {
|
|
|
46223
46223
|
frameRect.render(context);
|
|
46224
46224
|
}
|
|
46225
46225
|
group.children.forEach((child) => {
|
|
46226
|
+
child.render(context);
|
|
46226
46227
|
const childRect = child.getMbr();
|
|
46227
46228
|
childRect.backgroundColor = FRAME_CHILDREN_HIGHLIGHTER_COLOR;
|
|
46228
46229
|
childRect.borderColor = FRAME_CHILDREN_HIGHLIGHTER_BORDER_COLOR;
|
|
@@ -48063,7 +48064,7 @@ class AlignmentHelper {
|
|
|
48063
48064
|
const cameraWidth = camera.getWidth();
|
|
48064
48065
|
const scale = this.board.camera.getScale();
|
|
48065
48066
|
const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
|
|
48066
|
-
const childrenIds =
|
|
48067
|
+
const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
|
|
48067
48068
|
const nearbyItems = this.canvasDrawer.getLastCreatedCanvas() ? this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (item) => !excludeItems.includes(item), Math.ceil(cameraWidth)) : this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (otherItem) => otherItem !== movingMBR && otherItem.itemType !== "Connector" && otherItem.itemType !== "Drawing" && otherItem.isInView(camera) && !childrenIds.includes(otherItem.getId()), Math.ceil(cameraWidth)).filter((item) => Array.isArray(movingItem) ? !movingItem.includes(item) : true);
|
|
48068
48069
|
const verticalAlignments = new Map;
|
|
48069
48070
|
const horizontalAlignments = new Map;
|
|
@@ -48968,10 +48969,13 @@ class Select extends Tool {
|
|
|
48968
48969
|
const isNotInSelection = this.board.selection.items.findById(underPointer.getId()) === null;
|
|
48969
48970
|
if (isNotInSelection) {
|
|
48970
48971
|
this.board.selection.add(underPointer);
|
|
48971
|
-
if (underPointer
|
|
48972
|
+
if ("index" in underPointer && underPointer.index) {
|
|
48972
48973
|
const { left, right, top, bottom } = underPointer.getMbr();
|
|
48973
|
-
const
|
|
48974
|
-
|
|
48974
|
+
const childrenIds = underPointer.getChildrenIds();
|
|
48975
|
+
if (childrenIds) {
|
|
48976
|
+
const itemsInFrame = this.board.items.getEnclosedOrCrossed(left, top, right, bottom).filter((item) => childrenIds.includes(item.getId()));
|
|
48977
|
+
this.board.selection.add(itemsInFrame);
|
|
48978
|
+
}
|
|
48975
48979
|
}
|
|
48976
48980
|
this.board.selection.setContext("EditUnderPointer");
|
|
48977
48981
|
} else {
|
|
@@ -54466,7 +54470,7 @@ class BoardSelection {
|
|
|
54466
54470
|
const startItemId = startPoint.pointType !== "Board" ? startPoint.item.getId() : null;
|
|
54467
54471
|
const endItemId = endPoint.pointType !== "Board" ? endPoint.item.getId() : null;
|
|
54468
54472
|
const single = this.items.getSingle();
|
|
54469
|
-
const frameChild = single instanceof
|
|
54473
|
+
const frameChild = single instanceof BaseItem && single.index ? single.getChildrenIds() : null;
|
|
54470
54474
|
const hasStartItem = startItemId && !this.items.findById(startItemId) && !frameChild?.some((child) => child === startItemId);
|
|
54471
54475
|
const hasEndItem = endItemId && !this.items.findById(endItemId) && !frameChild?.some((child) => child === endItemId);
|
|
54472
54476
|
if (hasStartItem) {
|
|
@@ -54717,7 +54721,7 @@ class BoardSelection {
|
|
|
54717
54721
|
};
|
|
54718
54722
|
}
|
|
54719
54723
|
function tryToAddFrameChildrenToTranslation(selectedItem) {
|
|
54720
|
-
if (!("index" in selectedItem)
|
|
54724
|
+
if (!("index" in selectedItem) || !selectedItem.index) {
|
|
54721
54725
|
return;
|
|
54722
54726
|
}
|
|
54723
54727
|
for (const childId of selectedItem.getChildrenIds()) {
|
package/dist/esm/browser.js
CHANGED
|
@@ -43600,6 +43600,7 @@ class NestingHighlighter extends Tool {
|
|
|
43600
43600
|
frameRect.render(context);
|
|
43601
43601
|
}
|
|
43602
43602
|
group.children.forEach((child) => {
|
|
43603
|
+
child.render(context);
|
|
43603
43604
|
const childRect = child.getMbr();
|
|
43604
43605
|
childRect.backgroundColor = FRAME_CHILDREN_HIGHLIGHTER_COLOR;
|
|
43605
43606
|
childRect.borderColor = FRAME_CHILDREN_HIGHLIGHTER_BORDER_COLOR;
|
|
@@ -45440,7 +45441,7 @@ class AlignmentHelper {
|
|
|
45440
45441
|
const cameraWidth = camera.getWidth();
|
|
45441
45442
|
const scale = this.board.camera.getScale();
|
|
45442
45443
|
const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
|
|
45443
|
-
const childrenIds =
|
|
45444
|
+
const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
|
|
45444
45445
|
const nearbyItems = this.canvasDrawer.getLastCreatedCanvas() ? this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (item) => !excludeItems.includes(item), Math.ceil(cameraWidth)) : this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (otherItem) => otherItem !== movingMBR && otherItem.itemType !== "Connector" && otherItem.itemType !== "Drawing" && otherItem.isInView(camera) && !childrenIds.includes(otherItem.getId()), Math.ceil(cameraWidth)).filter((item) => Array.isArray(movingItem) ? !movingItem.includes(item) : true);
|
|
45445
45446
|
const verticalAlignments = new Map;
|
|
45446
45447
|
const horizontalAlignments = new Map;
|
|
@@ -46345,10 +46346,13 @@ class Select extends Tool {
|
|
|
46345
46346
|
const isNotInSelection = this.board.selection.items.findById(underPointer.getId()) === null;
|
|
46346
46347
|
if (isNotInSelection) {
|
|
46347
46348
|
this.board.selection.add(underPointer);
|
|
46348
|
-
if (underPointer
|
|
46349
|
+
if ("index" in underPointer && underPointer.index) {
|
|
46349
46350
|
const { left, right, top, bottom } = underPointer.getMbr();
|
|
46350
|
-
const
|
|
46351
|
-
|
|
46351
|
+
const childrenIds = underPointer.getChildrenIds();
|
|
46352
|
+
if (childrenIds) {
|
|
46353
|
+
const itemsInFrame = this.board.items.getEnclosedOrCrossed(left, top, right, bottom).filter((item) => childrenIds.includes(item.getId()));
|
|
46354
|
+
this.board.selection.add(itemsInFrame);
|
|
46355
|
+
}
|
|
46352
46356
|
}
|
|
46353
46357
|
this.board.selection.setContext("EditUnderPointer");
|
|
46354
46358
|
} else {
|
|
@@ -51843,7 +51847,7 @@ class BoardSelection {
|
|
|
51843
51847
|
const startItemId = startPoint.pointType !== "Board" ? startPoint.item.getId() : null;
|
|
51844
51848
|
const endItemId = endPoint.pointType !== "Board" ? endPoint.item.getId() : null;
|
|
51845
51849
|
const single = this.items.getSingle();
|
|
51846
|
-
const frameChild = single instanceof
|
|
51850
|
+
const frameChild = single instanceof BaseItem && single.index ? single.getChildrenIds() : null;
|
|
51847
51851
|
const hasStartItem = startItemId && !this.items.findById(startItemId) && !frameChild?.some((child) => child === startItemId);
|
|
51848
51852
|
const hasEndItem = endItemId && !this.items.findById(endItemId) && !frameChild?.some((child) => child === endItemId);
|
|
51849
51853
|
if (hasStartItem) {
|
|
@@ -52094,7 +52098,7 @@ class BoardSelection {
|
|
|
52094
52098
|
};
|
|
52095
52099
|
}
|
|
52096
52100
|
function tryToAddFrameChildrenToTranslation(selectedItem) {
|
|
52097
|
-
if (!("index" in selectedItem)
|
|
52101
|
+
if (!("index" in selectedItem) || !selectedItem.index) {
|
|
52098
52102
|
return;
|
|
52099
52103
|
}
|
|
52100
52104
|
for (const childId of selectedItem.getChildrenIds()) {
|
package/dist/esm/index.js
CHANGED
|
@@ -43593,6 +43593,7 @@ class NestingHighlighter extends Tool {
|
|
|
43593
43593
|
frameRect.render(context);
|
|
43594
43594
|
}
|
|
43595
43595
|
group.children.forEach((child) => {
|
|
43596
|
+
child.render(context);
|
|
43596
43597
|
const childRect = child.getMbr();
|
|
43597
43598
|
childRect.backgroundColor = FRAME_CHILDREN_HIGHLIGHTER_COLOR;
|
|
43598
43599
|
childRect.borderColor = FRAME_CHILDREN_HIGHLIGHTER_BORDER_COLOR;
|
|
@@ -45433,7 +45434,7 @@ class AlignmentHelper {
|
|
|
45433
45434
|
const cameraWidth = camera.getWidth();
|
|
45434
45435
|
const scale = this.board.camera.getScale();
|
|
45435
45436
|
const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
|
|
45436
|
-
const childrenIds =
|
|
45437
|
+
const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
|
|
45437
45438
|
const nearbyItems = this.canvasDrawer.getLastCreatedCanvas() ? this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (item) => !excludeItems.includes(item), Math.ceil(cameraWidth)) : this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (otherItem) => otherItem !== movingMBR && otherItem.itemType !== "Connector" && otherItem.itemType !== "Drawing" && otherItem.isInView(camera) && !childrenIds.includes(otherItem.getId()), Math.ceil(cameraWidth)).filter((item) => Array.isArray(movingItem) ? !movingItem.includes(item) : true);
|
|
45438
45439
|
const verticalAlignments = new Map;
|
|
45439
45440
|
const horizontalAlignments = new Map;
|
|
@@ -46338,10 +46339,13 @@ class Select extends Tool {
|
|
|
46338
46339
|
const isNotInSelection = this.board.selection.items.findById(underPointer.getId()) === null;
|
|
46339
46340
|
if (isNotInSelection) {
|
|
46340
46341
|
this.board.selection.add(underPointer);
|
|
46341
|
-
if (underPointer
|
|
46342
|
+
if ("index" in underPointer && underPointer.index) {
|
|
46342
46343
|
const { left, right, top, bottom } = underPointer.getMbr();
|
|
46343
|
-
const
|
|
46344
|
-
|
|
46344
|
+
const childrenIds = underPointer.getChildrenIds();
|
|
46345
|
+
if (childrenIds) {
|
|
46346
|
+
const itemsInFrame = this.board.items.getEnclosedOrCrossed(left, top, right, bottom).filter((item) => childrenIds.includes(item.getId()));
|
|
46347
|
+
this.board.selection.add(itemsInFrame);
|
|
46348
|
+
}
|
|
46345
46349
|
}
|
|
46346
46350
|
this.board.selection.setContext("EditUnderPointer");
|
|
46347
46351
|
} else {
|
|
@@ -51836,7 +51840,7 @@ class BoardSelection {
|
|
|
51836
51840
|
const startItemId = startPoint.pointType !== "Board" ? startPoint.item.getId() : null;
|
|
51837
51841
|
const endItemId = endPoint.pointType !== "Board" ? endPoint.item.getId() : null;
|
|
51838
51842
|
const single = this.items.getSingle();
|
|
51839
|
-
const frameChild = single instanceof
|
|
51843
|
+
const frameChild = single instanceof BaseItem && single.index ? single.getChildrenIds() : null;
|
|
51840
51844
|
const hasStartItem = startItemId && !this.items.findById(startItemId) && !frameChild?.some((child) => child === startItemId);
|
|
51841
51845
|
const hasEndItem = endItemId && !this.items.findById(endItemId) && !frameChild?.some((child) => child === endItemId);
|
|
51842
51846
|
if (hasStartItem) {
|
|
@@ -52087,7 +52091,7 @@ class BoardSelection {
|
|
|
52087
52091
|
};
|
|
52088
52092
|
}
|
|
52089
52093
|
function tryToAddFrameChildrenToTranslation(selectedItem) {
|
|
52090
|
-
if (!("index" in selectedItem)
|
|
52094
|
+
if (!("index" in selectedItem) || !selectedItem.index) {
|
|
52091
52095
|
return;
|
|
52092
52096
|
}
|
|
52093
52097
|
for (const childId of selectedItem.getChildrenIds()) {
|
package/dist/esm/node.js
CHANGED
|
@@ -46061,6 +46061,7 @@ class NestingHighlighter extends Tool {
|
|
|
46061
46061
|
frameRect.render(context);
|
|
46062
46062
|
}
|
|
46063
46063
|
group.children.forEach((child) => {
|
|
46064
|
+
child.render(context);
|
|
46064
46065
|
const childRect = child.getMbr();
|
|
46065
46066
|
childRect.backgroundColor = FRAME_CHILDREN_HIGHLIGHTER_COLOR;
|
|
46066
46067
|
childRect.borderColor = FRAME_CHILDREN_HIGHLIGHTER_BORDER_COLOR;
|
|
@@ -47901,7 +47902,7 @@ class AlignmentHelper {
|
|
|
47901
47902
|
const cameraWidth = camera.getWidth();
|
|
47902
47903
|
const scale = this.board.camera.getScale();
|
|
47903
47904
|
const dynamicAlignThreshold = Math.min(this.alignThreshold / scale, 8);
|
|
47904
|
-
const childrenIds =
|
|
47905
|
+
const childrenIds = "index" in movingItem ? movingItem.getChildrenIds() : [];
|
|
47905
47906
|
const nearbyItems = this.canvasDrawer.getLastCreatedCanvas() ? this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (item) => !excludeItems.includes(item), Math.ceil(cameraWidth)) : this.spatialIndex.getNearestTo(movingMBR.getCenter(), 20, (otherItem) => otherItem !== movingMBR && otherItem.itemType !== "Connector" && otherItem.itemType !== "Drawing" && otherItem.isInView(camera) && !childrenIds.includes(otherItem.getId()), Math.ceil(cameraWidth)).filter((item) => Array.isArray(movingItem) ? !movingItem.includes(item) : true);
|
|
47906
47907
|
const verticalAlignments = new Map;
|
|
47907
47908
|
const horizontalAlignments = new Map;
|
|
@@ -48806,10 +48807,13 @@ class Select extends Tool {
|
|
|
48806
48807
|
const isNotInSelection = this.board.selection.items.findById(underPointer.getId()) === null;
|
|
48807
48808
|
if (isNotInSelection) {
|
|
48808
48809
|
this.board.selection.add(underPointer);
|
|
48809
|
-
if (underPointer
|
|
48810
|
+
if ("index" in underPointer && underPointer.index) {
|
|
48810
48811
|
const { left, right, top, bottom } = underPointer.getMbr();
|
|
48811
|
-
const
|
|
48812
|
-
|
|
48812
|
+
const childrenIds = underPointer.getChildrenIds();
|
|
48813
|
+
if (childrenIds) {
|
|
48814
|
+
const itemsInFrame = this.board.items.getEnclosedOrCrossed(left, top, right, bottom).filter((item) => childrenIds.includes(item.getId()));
|
|
48815
|
+
this.board.selection.add(itemsInFrame);
|
|
48816
|
+
}
|
|
48813
48817
|
}
|
|
48814
48818
|
this.board.selection.setContext("EditUnderPointer");
|
|
48815
48819
|
} else {
|
|
@@ -54304,7 +54308,7 @@ class BoardSelection {
|
|
|
54304
54308
|
const startItemId = startPoint.pointType !== "Board" ? startPoint.item.getId() : null;
|
|
54305
54309
|
const endItemId = endPoint.pointType !== "Board" ? endPoint.item.getId() : null;
|
|
54306
54310
|
const single = this.items.getSingle();
|
|
54307
|
-
const frameChild = single instanceof
|
|
54311
|
+
const frameChild = single instanceof BaseItem && single.index ? single.getChildrenIds() : null;
|
|
54308
54312
|
const hasStartItem = startItemId && !this.items.findById(startItemId) && !frameChild?.some((child) => child === startItemId);
|
|
54309
54313
|
const hasEndItem = endItemId && !this.items.findById(endItemId) && !frameChild?.some((child) => child === endItemId);
|
|
54310
54314
|
if (hasStartItem) {
|
|
@@ -54555,7 +54559,7 @@ class BoardSelection {
|
|
|
54555
54559
|
};
|
|
54556
54560
|
}
|
|
54557
54561
|
function tryToAddFrameChildrenToTranslation(selectedItem) {
|
|
54558
|
-
if (!("index" in selectedItem)
|
|
54562
|
+
if (!("index" in selectedItem) || !selectedItem.index) {
|
|
54559
54563
|
return;
|
|
54560
54564
|
}
|
|
54561
54565
|
for (const childId of selectedItem.getChildrenIds()) {
|