microboard-temp 0.5.52 → 0.5.53
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 +24 -12
- package/dist/cjs/index.js +24 -12
- package/dist/cjs/node.js +24 -12
- package/dist/esm/browser.js +24 -12
- package/dist/esm/index.js +24 -12
- package/dist/esm/node.js +24 -12
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -46528,10 +46528,10 @@ class Select extends Tool {
|
|
|
46528
46528
|
return false;
|
|
46529
46529
|
}
|
|
46530
46530
|
const draggingMbr = draggingItem.getMbr();
|
|
46531
|
-
const
|
|
46532
|
-
|
|
46533
|
-
if (
|
|
46534
|
-
this.nestingHighlighter.add(
|
|
46531
|
+
const groups = this.board.items.getEnclosedOrCrossed(draggingMbr.left, draggingMbr.top, draggingMbr.right, draggingMbr.bottom).filter((item) => !!(("index" in item) && item.index));
|
|
46532
|
+
groups.forEach((group) => {
|
|
46533
|
+
if (group.handleNesting(draggingItem)) {
|
|
46534
|
+
this.nestingHighlighter.add(group, draggingItem);
|
|
46535
46535
|
} else {
|
|
46536
46536
|
this.nestingHighlighter.remove(draggingItem);
|
|
46537
46537
|
}
|
|
@@ -46582,13 +46582,13 @@ class Select extends Tool {
|
|
|
46582
46582
|
}
|
|
46583
46583
|
}
|
|
46584
46584
|
updateFramesNesting(selectionMbr, selection) {
|
|
46585
|
-
const
|
|
46586
|
-
const
|
|
46585
|
+
const groups = this.board.items.getEnclosedOrCrossed(selectionMbr.left, selectionMbr.top, selectionMbr.right, selectionMbr.bottom).filter((item) => !!(("index" in item) && item.index)).filter((group) => !selection.items.list().includes(group));
|
|
46586
|
+
const draggingGroupsIds = selection.list().filter((item) => !!(("index" in item) && item.index)).map((group) => group.getId());
|
|
46587
46587
|
selection.list().forEach((item) => {
|
|
46588
|
-
if (!(item
|
|
46589
|
-
|
|
46590
|
-
if (
|
|
46591
|
-
this.nestingHighlighter.add(
|
|
46588
|
+
if (!(("index" in item) && item.index) && !draggingGroupsIds.includes(item.parent)) {
|
|
46589
|
+
groups.forEach((group) => {
|
|
46590
|
+
if (group.handleNesting(item)) {
|
|
46591
|
+
this.nestingHighlighter.add(group, item);
|
|
46592
46592
|
} else {
|
|
46593
46593
|
this.nestingHighlighter.remove(item);
|
|
46594
46594
|
}
|
|
@@ -48851,7 +48851,19 @@ class AddScreen extends ShapeTool {
|
|
|
48851
48851
|
localStorage.setItem("screenOwnerId", screenOwnerId);
|
|
48852
48852
|
}
|
|
48853
48853
|
this.item.applyOwnerId(screenOwnerId);
|
|
48854
|
-
|
|
48854
|
+
const currMbr = this.item.getMbr();
|
|
48855
|
+
const screenChildren = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board").filter((item) => this.item.handleNesting(item));
|
|
48856
|
+
const width2 = this.bounds.getWidth() < 2 ? 100 : this.bounds.getWidth();
|
|
48857
|
+
const height3 = this.bounds.getHeight() < 2 ? 100 : this.bounds.getHeight();
|
|
48858
|
+
this.initTransformation(width2 / 100, height3 / 100);
|
|
48859
|
+
const screen = this.board.add(this.item);
|
|
48860
|
+
screen.emitNesting(screenChildren);
|
|
48861
|
+
this.isDown = false;
|
|
48862
|
+
this.board.selection.removeAll();
|
|
48863
|
+
this.board.selection.add(screen);
|
|
48864
|
+
this.board.tools.select();
|
|
48865
|
+
this.board.tools.publish();
|
|
48866
|
+
return true;
|
|
48855
48867
|
}
|
|
48856
48868
|
}
|
|
48857
48869
|
|
|
@@ -51950,7 +51962,7 @@ function updateFrameChildren({
|
|
|
51950
51962
|
}) {
|
|
51951
51963
|
const groups = board.items.getGroupItemsEnclosedOrCrossed(mbr.left, mbr.top, mbr.right, mbr.bottom);
|
|
51952
51964
|
board.selection.items.list().forEach((item) => {
|
|
51953
|
-
if ("
|
|
51965
|
+
if ("index" in item && item.index) {
|
|
51954
51966
|
const currMbr = item.getMbr();
|
|
51955
51967
|
const itemsToCheck = board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom);
|
|
51956
51968
|
itemsToCheck.forEach((currItem) => {
|
package/dist/cjs/index.js
CHANGED
|
@@ -46528,10 +46528,10 @@ class Select extends Tool {
|
|
|
46528
46528
|
return false;
|
|
46529
46529
|
}
|
|
46530
46530
|
const draggingMbr = draggingItem.getMbr();
|
|
46531
|
-
const
|
|
46532
|
-
|
|
46533
|
-
if (
|
|
46534
|
-
this.nestingHighlighter.add(
|
|
46531
|
+
const groups = this.board.items.getEnclosedOrCrossed(draggingMbr.left, draggingMbr.top, draggingMbr.right, draggingMbr.bottom).filter((item) => !!(("index" in item) && item.index));
|
|
46532
|
+
groups.forEach((group) => {
|
|
46533
|
+
if (group.handleNesting(draggingItem)) {
|
|
46534
|
+
this.nestingHighlighter.add(group, draggingItem);
|
|
46535
46535
|
} else {
|
|
46536
46536
|
this.nestingHighlighter.remove(draggingItem);
|
|
46537
46537
|
}
|
|
@@ -46582,13 +46582,13 @@ class Select extends Tool {
|
|
|
46582
46582
|
}
|
|
46583
46583
|
}
|
|
46584
46584
|
updateFramesNesting(selectionMbr, selection) {
|
|
46585
|
-
const
|
|
46586
|
-
const
|
|
46585
|
+
const groups = this.board.items.getEnclosedOrCrossed(selectionMbr.left, selectionMbr.top, selectionMbr.right, selectionMbr.bottom).filter((item) => !!(("index" in item) && item.index)).filter((group) => !selection.items.list().includes(group));
|
|
46586
|
+
const draggingGroupsIds = selection.list().filter((item) => !!(("index" in item) && item.index)).map((group) => group.getId());
|
|
46587
46587
|
selection.list().forEach((item) => {
|
|
46588
|
-
if (!(item
|
|
46589
|
-
|
|
46590
|
-
if (
|
|
46591
|
-
this.nestingHighlighter.add(
|
|
46588
|
+
if (!(("index" in item) && item.index) && !draggingGroupsIds.includes(item.parent)) {
|
|
46589
|
+
groups.forEach((group) => {
|
|
46590
|
+
if (group.handleNesting(item)) {
|
|
46591
|
+
this.nestingHighlighter.add(group, item);
|
|
46592
46592
|
} else {
|
|
46593
46593
|
this.nestingHighlighter.remove(item);
|
|
46594
46594
|
}
|
|
@@ -48851,7 +48851,19 @@ class AddScreen extends ShapeTool {
|
|
|
48851
48851
|
localStorage.setItem("screenOwnerId", screenOwnerId);
|
|
48852
48852
|
}
|
|
48853
48853
|
this.item.applyOwnerId(screenOwnerId);
|
|
48854
|
-
|
|
48854
|
+
const currMbr = this.item.getMbr();
|
|
48855
|
+
const screenChildren = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board").filter((item) => this.item.handleNesting(item));
|
|
48856
|
+
const width2 = this.bounds.getWidth() < 2 ? 100 : this.bounds.getWidth();
|
|
48857
|
+
const height3 = this.bounds.getHeight() < 2 ? 100 : this.bounds.getHeight();
|
|
48858
|
+
this.initTransformation(width2 / 100, height3 / 100);
|
|
48859
|
+
const screen = this.board.add(this.item);
|
|
48860
|
+
screen.emitNesting(screenChildren);
|
|
48861
|
+
this.isDown = false;
|
|
48862
|
+
this.board.selection.removeAll();
|
|
48863
|
+
this.board.selection.add(screen);
|
|
48864
|
+
this.board.tools.select();
|
|
48865
|
+
this.board.tools.publish();
|
|
48866
|
+
return true;
|
|
48855
48867
|
}
|
|
48856
48868
|
}
|
|
48857
48869
|
|
|
@@ -51950,7 +51962,7 @@ function updateFrameChildren({
|
|
|
51950
51962
|
}) {
|
|
51951
51963
|
const groups = board.items.getGroupItemsEnclosedOrCrossed(mbr.left, mbr.top, mbr.right, mbr.bottom);
|
|
51952
51964
|
board.selection.items.list().forEach((item) => {
|
|
51953
|
-
if ("
|
|
51965
|
+
if ("index" in item && item.index) {
|
|
51954
51966
|
const currMbr = item.getMbr();
|
|
51955
51967
|
const itemsToCheck = board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom);
|
|
51956
51968
|
itemsToCheck.forEach((currItem) => {
|
package/dist/cjs/node.js
CHANGED
|
@@ -49001,10 +49001,10 @@ class Select extends Tool {
|
|
|
49001
49001
|
return false;
|
|
49002
49002
|
}
|
|
49003
49003
|
const draggingMbr = draggingItem.getMbr();
|
|
49004
|
-
const
|
|
49005
|
-
|
|
49006
|
-
if (
|
|
49007
|
-
this.nestingHighlighter.add(
|
|
49004
|
+
const groups = this.board.items.getEnclosedOrCrossed(draggingMbr.left, draggingMbr.top, draggingMbr.right, draggingMbr.bottom).filter((item) => !!(("index" in item) && item.index));
|
|
49005
|
+
groups.forEach((group) => {
|
|
49006
|
+
if (group.handleNesting(draggingItem)) {
|
|
49007
|
+
this.nestingHighlighter.add(group, draggingItem);
|
|
49008
49008
|
} else {
|
|
49009
49009
|
this.nestingHighlighter.remove(draggingItem);
|
|
49010
49010
|
}
|
|
@@ -49055,13 +49055,13 @@ class Select extends Tool {
|
|
|
49055
49055
|
}
|
|
49056
49056
|
}
|
|
49057
49057
|
updateFramesNesting(selectionMbr, selection) {
|
|
49058
|
-
const
|
|
49059
|
-
const
|
|
49058
|
+
const groups = this.board.items.getEnclosedOrCrossed(selectionMbr.left, selectionMbr.top, selectionMbr.right, selectionMbr.bottom).filter((item) => !!(("index" in item) && item.index)).filter((group) => !selection.items.list().includes(group));
|
|
49059
|
+
const draggingGroupsIds = selection.list().filter((item) => !!(("index" in item) && item.index)).map((group) => group.getId());
|
|
49060
49060
|
selection.list().forEach((item) => {
|
|
49061
|
-
if (!(item
|
|
49062
|
-
|
|
49063
|
-
if (
|
|
49064
|
-
this.nestingHighlighter.add(
|
|
49061
|
+
if (!(("index" in item) && item.index) && !draggingGroupsIds.includes(item.parent)) {
|
|
49062
|
+
groups.forEach((group) => {
|
|
49063
|
+
if (group.handleNesting(item)) {
|
|
49064
|
+
this.nestingHighlighter.add(group, item);
|
|
49065
49065
|
} else {
|
|
49066
49066
|
this.nestingHighlighter.remove(item);
|
|
49067
49067
|
}
|
|
@@ -51324,7 +51324,19 @@ class AddScreen extends ShapeTool {
|
|
|
51324
51324
|
localStorage.setItem("screenOwnerId", screenOwnerId);
|
|
51325
51325
|
}
|
|
51326
51326
|
this.item.applyOwnerId(screenOwnerId);
|
|
51327
|
-
|
|
51327
|
+
const currMbr = this.item.getMbr();
|
|
51328
|
+
const screenChildren = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board").filter((item) => this.item.handleNesting(item));
|
|
51329
|
+
const width2 = this.bounds.getWidth() < 2 ? 100 : this.bounds.getWidth();
|
|
51330
|
+
const height3 = this.bounds.getHeight() < 2 ? 100 : this.bounds.getHeight();
|
|
51331
|
+
this.initTransformation(width2 / 100, height3 / 100);
|
|
51332
|
+
const screen = this.board.add(this.item);
|
|
51333
|
+
screen.emitNesting(screenChildren);
|
|
51334
|
+
this.isDown = false;
|
|
51335
|
+
this.board.selection.removeAll();
|
|
51336
|
+
this.board.selection.add(screen);
|
|
51337
|
+
this.board.tools.select();
|
|
51338
|
+
this.board.tools.publish();
|
|
51339
|
+
return true;
|
|
51328
51340
|
}
|
|
51329
51341
|
}
|
|
51330
51342
|
|
|
@@ -54423,7 +54435,7 @@ function updateFrameChildren({
|
|
|
54423
54435
|
}) {
|
|
54424
54436
|
const groups = board.items.getGroupItemsEnclosedOrCrossed(mbr.left, mbr.top, mbr.right, mbr.bottom);
|
|
54425
54437
|
board.selection.items.list().forEach((item) => {
|
|
54426
|
-
if ("
|
|
54438
|
+
if ("index" in item && item.index) {
|
|
54427
54439
|
const currMbr = item.getMbr();
|
|
54428
54440
|
const itemsToCheck = board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom);
|
|
54429
54441
|
itemsToCheck.forEach((currItem) => {
|
package/dist/esm/browser.js
CHANGED
|
@@ -46374,10 +46374,10 @@ class Select extends Tool {
|
|
|
46374
46374
|
return false;
|
|
46375
46375
|
}
|
|
46376
46376
|
const draggingMbr = draggingItem.getMbr();
|
|
46377
|
-
const
|
|
46378
|
-
|
|
46379
|
-
if (
|
|
46380
|
-
this.nestingHighlighter.add(
|
|
46377
|
+
const groups = this.board.items.getEnclosedOrCrossed(draggingMbr.left, draggingMbr.top, draggingMbr.right, draggingMbr.bottom).filter((item) => !!(("index" in item) && item.index));
|
|
46378
|
+
groups.forEach((group) => {
|
|
46379
|
+
if (group.handleNesting(draggingItem)) {
|
|
46380
|
+
this.nestingHighlighter.add(group, draggingItem);
|
|
46381
46381
|
} else {
|
|
46382
46382
|
this.nestingHighlighter.remove(draggingItem);
|
|
46383
46383
|
}
|
|
@@ -46428,13 +46428,13 @@ class Select extends Tool {
|
|
|
46428
46428
|
}
|
|
46429
46429
|
}
|
|
46430
46430
|
updateFramesNesting(selectionMbr, selection) {
|
|
46431
|
-
const
|
|
46432
|
-
const
|
|
46431
|
+
const groups = this.board.items.getEnclosedOrCrossed(selectionMbr.left, selectionMbr.top, selectionMbr.right, selectionMbr.bottom).filter((item) => !!(("index" in item) && item.index)).filter((group) => !selection.items.list().includes(group));
|
|
46432
|
+
const draggingGroupsIds = selection.list().filter((item) => !!(("index" in item) && item.index)).map((group) => group.getId());
|
|
46433
46433
|
selection.list().forEach((item) => {
|
|
46434
|
-
if (!(item
|
|
46435
|
-
|
|
46436
|
-
if (
|
|
46437
|
-
this.nestingHighlighter.add(
|
|
46434
|
+
if (!(("index" in item) && item.index) && !draggingGroupsIds.includes(item.parent)) {
|
|
46435
|
+
groups.forEach((group) => {
|
|
46436
|
+
if (group.handleNesting(item)) {
|
|
46437
|
+
this.nestingHighlighter.add(group, item);
|
|
46438
46438
|
} else {
|
|
46439
46439
|
this.nestingHighlighter.remove(item);
|
|
46440
46440
|
}
|
|
@@ -48697,7 +48697,19 @@ class AddScreen extends ShapeTool {
|
|
|
48697
48697
|
localStorage.setItem("screenOwnerId", screenOwnerId);
|
|
48698
48698
|
}
|
|
48699
48699
|
this.item.applyOwnerId(screenOwnerId);
|
|
48700
|
-
|
|
48700
|
+
const currMbr = this.item.getMbr();
|
|
48701
|
+
const screenChildren = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board").filter((item) => this.item.handleNesting(item));
|
|
48702
|
+
const width2 = this.bounds.getWidth() < 2 ? 100 : this.bounds.getWidth();
|
|
48703
|
+
const height3 = this.bounds.getHeight() < 2 ? 100 : this.bounds.getHeight();
|
|
48704
|
+
this.initTransformation(width2 / 100, height3 / 100);
|
|
48705
|
+
const screen = this.board.add(this.item);
|
|
48706
|
+
screen.emitNesting(screenChildren);
|
|
48707
|
+
this.isDown = false;
|
|
48708
|
+
this.board.selection.removeAll();
|
|
48709
|
+
this.board.selection.add(screen);
|
|
48710
|
+
this.board.tools.select();
|
|
48711
|
+
this.board.tools.publish();
|
|
48712
|
+
return true;
|
|
48701
48713
|
}
|
|
48702
48714
|
}
|
|
48703
48715
|
|
|
@@ -51796,7 +51808,7 @@ function updateFrameChildren({
|
|
|
51796
51808
|
}) {
|
|
51797
51809
|
const groups = board.items.getGroupItemsEnclosedOrCrossed(mbr.left, mbr.top, mbr.right, mbr.bottom);
|
|
51798
51810
|
board.selection.items.list().forEach((item) => {
|
|
51799
|
-
if ("
|
|
51811
|
+
if ("index" in item && item.index) {
|
|
51800
51812
|
const currMbr = item.getMbr();
|
|
51801
51813
|
const itemsToCheck = board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom);
|
|
51802
51814
|
itemsToCheck.forEach((currItem) => {
|
package/dist/esm/index.js
CHANGED
|
@@ -46367,10 +46367,10 @@ class Select extends Tool {
|
|
|
46367
46367
|
return false;
|
|
46368
46368
|
}
|
|
46369
46369
|
const draggingMbr = draggingItem.getMbr();
|
|
46370
|
-
const
|
|
46371
|
-
|
|
46372
|
-
if (
|
|
46373
|
-
this.nestingHighlighter.add(
|
|
46370
|
+
const groups = this.board.items.getEnclosedOrCrossed(draggingMbr.left, draggingMbr.top, draggingMbr.right, draggingMbr.bottom).filter((item) => !!(("index" in item) && item.index));
|
|
46371
|
+
groups.forEach((group) => {
|
|
46372
|
+
if (group.handleNesting(draggingItem)) {
|
|
46373
|
+
this.nestingHighlighter.add(group, draggingItem);
|
|
46374
46374
|
} else {
|
|
46375
46375
|
this.nestingHighlighter.remove(draggingItem);
|
|
46376
46376
|
}
|
|
@@ -46421,13 +46421,13 @@ class Select extends Tool {
|
|
|
46421
46421
|
}
|
|
46422
46422
|
}
|
|
46423
46423
|
updateFramesNesting(selectionMbr, selection) {
|
|
46424
|
-
const
|
|
46425
|
-
const
|
|
46424
|
+
const groups = this.board.items.getEnclosedOrCrossed(selectionMbr.left, selectionMbr.top, selectionMbr.right, selectionMbr.bottom).filter((item) => !!(("index" in item) && item.index)).filter((group) => !selection.items.list().includes(group));
|
|
46425
|
+
const draggingGroupsIds = selection.list().filter((item) => !!(("index" in item) && item.index)).map((group) => group.getId());
|
|
46426
46426
|
selection.list().forEach((item) => {
|
|
46427
|
-
if (!(item
|
|
46428
|
-
|
|
46429
|
-
if (
|
|
46430
|
-
this.nestingHighlighter.add(
|
|
46427
|
+
if (!(("index" in item) && item.index) && !draggingGroupsIds.includes(item.parent)) {
|
|
46428
|
+
groups.forEach((group) => {
|
|
46429
|
+
if (group.handleNesting(item)) {
|
|
46430
|
+
this.nestingHighlighter.add(group, item);
|
|
46431
46431
|
} else {
|
|
46432
46432
|
this.nestingHighlighter.remove(item);
|
|
46433
46433
|
}
|
|
@@ -48690,7 +48690,19 @@ class AddScreen extends ShapeTool {
|
|
|
48690
48690
|
localStorage.setItem("screenOwnerId", screenOwnerId);
|
|
48691
48691
|
}
|
|
48692
48692
|
this.item.applyOwnerId(screenOwnerId);
|
|
48693
|
-
|
|
48693
|
+
const currMbr = this.item.getMbr();
|
|
48694
|
+
const screenChildren = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board").filter((item) => this.item.handleNesting(item));
|
|
48695
|
+
const width2 = this.bounds.getWidth() < 2 ? 100 : this.bounds.getWidth();
|
|
48696
|
+
const height3 = this.bounds.getHeight() < 2 ? 100 : this.bounds.getHeight();
|
|
48697
|
+
this.initTransformation(width2 / 100, height3 / 100);
|
|
48698
|
+
const screen = this.board.add(this.item);
|
|
48699
|
+
screen.emitNesting(screenChildren);
|
|
48700
|
+
this.isDown = false;
|
|
48701
|
+
this.board.selection.removeAll();
|
|
48702
|
+
this.board.selection.add(screen);
|
|
48703
|
+
this.board.tools.select();
|
|
48704
|
+
this.board.tools.publish();
|
|
48705
|
+
return true;
|
|
48694
48706
|
}
|
|
48695
48707
|
}
|
|
48696
48708
|
|
|
@@ -51789,7 +51801,7 @@ function updateFrameChildren({
|
|
|
51789
51801
|
}) {
|
|
51790
51802
|
const groups = board.items.getGroupItemsEnclosedOrCrossed(mbr.left, mbr.top, mbr.right, mbr.bottom);
|
|
51791
51803
|
board.selection.items.list().forEach((item) => {
|
|
51792
|
-
if ("
|
|
51804
|
+
if ("index" in item && item.index) {
|
|
51793
51805
|
const currMbr = item.getMbr();
|
|
51794
51806
|
const itemsToCheck = board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom);
|
|
51795
51807
|
itemsToCheck.forEach((currItem) => {
|
package/dist/esm/node.js
CHANGED
|
@@ -48835,10 +48835,10 @@ class Select extends Tool {
|
|
|
48835
48835
|
return false;
|
|
48836
48836
|
}
|
|
48837
48837
|
const draggingMbr = draggingItem.getMbr();
|
|
48838
|
-
const
|
|
48839
|
-
|
|
48840
|
-
if (
|
|
48841
|
-
this.nestingHighlighter.add(
|
|
48838
|
+
const groups = this.board.items.getEnclosedOrCrossed(draggingMbr.left, draggingMbr.top, draggingMbr.right, draggingMbr.bottom).filter((item) => !!(("index" in item) && item.index));
|
|
48839
|
+
groups.forEach((group) => {
|
|
48840
|
+
if (group.handleNesting(draggingItem)) {
|
|
48841
|
+
this.nestingHighlighter.add(group, draggingItem);
|
|
48842
48842
|
} else {
|
|
48843
48843
|
this.nestingHighlighter.remove(draggingItem);
|
|
48844
48844
|
}
|
|
@@ -48889,13 +48889,13 @@ class Select extends Tool {
|
|
|
48889
48889
|
}
|
|
48890
48890
|
}
|
|
48891
48891
|
updateFramesNesting(selectionMbr, selection) {
|
|
48892
|
-
const
|
|
48893
|
-
const
|
|
48892
|
+
const groups = this.board.items.getEnclosedOrCrossed(selectionMbr.left, selectionMbr.top, selectionMbr.right, selectionMbr.bottom).filter((item) => !!(("index" in item) && item.index)).filter((group) => !selection.items.list().includes(group));
|
|
48893
|
+
const draggingGroupsIds = selection.list().filter((item) => !!(("index" in item) && item.index)).map((group) => group.getId());
|
|
48894
48894
|
selection.list().forEach((item) => {
|
|
48895
|
-
if (!(item
|
|
48896
|
-
|
|
48897
|
-
if (
|
|
48898
|
-
this.nestingHighlighter.add(
|
|
48895
|
+
if (!(("index" in item) && item.index) && !draggingGroupsIds.includes(item.parent)) {
|
|
48896
|
+
groups.forEach((group) => {
|
|
48897
|
+
if (group.handleNesting(item)) {
|
|
48898
|
+
this.nestingHighlighter.add(group, item);
|
|
48899
48899
|
} else {
|
|
48900
48900
|
this.nestingHighlighter.remove(item);
|
|
48901
48901
|
}
|
|
@@ -51158,7 +51158,19 @@ class AddScreen extends ShapeTool {
|
|
|
51158
51158
|
localStorage.setItem("screenOwnerId", screenOwnerId);
|
|
51159
51159
|
}
|
|
51160
51160
|
this.item.applyOwnerId(screenOwnerId);
|
|
51161
|
-
|
|
51161
|
+
const currMbr = this.item.getMbr();
|
|
51162
|
+
const screenChildren = this.board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom).filter((item) => item.parent === "Board").filter((item) => this.item.handleNesting(item));
|
|
51163
|
+
const width2 = this.bounds.getWidth() < 2 ? 100 : this.bounds.getWidth();
|
|
51164
|
+
const height3 = this.bounds.getHeight() < 2 ? 100 : this.bounds.getHeight();
|
|
51165
|
+
this.initTransformation(width2 / 100, height3 / 100);
|
|
51166
|
+
const screen = this.board.add(this.item);
|
|
51167
|
+
screen.emitNesting(screenChildren);
|
|
51168
|
+
this.isDown = false;
|
|
51169
|
+
this.board.selection.removeAll();
|
|
51170
|
+
this.board.selection.add(screen);
|
|
51171
|
+
this.board.tools.select();
|
|
51172
|
+
this.board.tools.publish();
|
|
51173
|
+
return true;
|
|
51162
51174
|
}
|
|
51163
51175
|
}
|
|
51164
51176
|
|
|
@@ -54257,7 +54269,7 @@ function updateFrameChildren({
|
|
|
54257
54269
|
}) {
|
|
54258
54270
|
const groups = board.items.getGroupItemsEnclosedOrCrossed(mbr.left, mbr.top, mbr.right, mbr.bottom);
|
|
54259
54271
|
board.selection.items.list().forEach((item) => {
|
|
54260
|
-
if ("
|
|
54272
|
+
if ("index" in item && item.index) {
|
|
54261
54273
|
const currMbr = item.getMbr();
|
|
54262
54274
|
const itemsToCheck = board.items.getEnclosedOrCrossed(currMbr.left, currMbr.top, currMbr.right, currMbr.bottom);
|
|
54263
54275
|
itemsToCheck.forEach((currItem) => {
|