microboard-temp 0.12.7 → 0.12.8
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 +5 -4
- package/dist/cjs/index.js +5 -4
- package/dist/cjs/node.js +5 -4
- package/dist/esm/browser.js +5 -4
- package/dist/esm/index.js +5 -4
- package/dist/esm/node.js +5 -4
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -46064,8 +46064,9 @@ function getQuickAddButtons(selection, board) {
|
|
|
46064
46064
|
let quickAddItems = undefined;
|
|
46065
46065
|
function calculateQuickAddPosition(index2, selectedItem, connectorStartPoint) {
|
|
46066
46066
|
const connectorStorage = new SessionStorage;
|
|
46067
|
-
const currMbr = selectedItem.getPathMbr();
|
|
46067
|
+
const currMbr = selectedItem instanceof BaseItem ? selectedItem.getWorldMbr() : selectedItem.getPathMbr();
|
|
46068
46068
|
const selectedItemData = selectedItem.serialize();
|
|
46069
|
+
const selectedMatrix = selectedItem instanceof BaseItem ? selectedItem.getWorldMatrix() : new Matrix(selectedItemData.transformation?.translateX || 0, selectedItemData.transformation?.translateY || 0);
|
|
46069
46070
|
const width2 = currMbr.getWidth();
|
|
46070
46071
|
const height3 = currMbr.getHeight();
|
|
46071
46072
|
let offsetX = width2;
|
|
@@ -46105,8 +46106,8 @@ function getQuickAddButtons(selection, board) {
|
|
|
46105
46106
|
const adjustment = baseAdjustments[index2];
|
|
46106
46107
|
const newItemData = { ...itemData };
|
|
46107
46108
|
if (newItemData.transformation) {
|
|
46108
|
-
newItemData.transformation.translateX = adjustment.translateX +
|
|
46109
|
-
newItemData.transformation.translateY = adjustment.translateY +
|
|
46109
|
+
newItemData.transformation.translateX = adjustment.translateX + selectedMatrix.translateX;
|
|
46110
|
+
newItemData.transformation.translateY = adjustment.translateY + selectedMatrix.translateY + height3 / 2 - newHeight / 2;
|
|
46110
46111
|
}
|
|
46111
46112
|
const newMbr = new Mbr(newItemData.transformation?.translateX, newItemData.transformation?.translateY, (newItemData.transformation?.translateX || 0) + newWidth, (newItemData.transformation?.translateY || 0) + newHeight);
|
|
46112
46113
|
let step = 1;
|
|
@@ -46197,7 +46198,7 @@ function getQuickAddButtons(selection, board) {
|
|
|
46197
46198
|
}
|
|
46198
46199
|
function getQuickButtonsPositions(customMbr) {
|
|
46199
46200
|
const single = selection.items.getSingle();
|
|
46200
|
-
const itemMbr = customMbr ? customMbr : single?.getMbr();
|
|
46201
|
+
const itemMbr = customMbr ? customMbr : single instanceof BaseItem ? single.getWorldMbr() : single?.getMbr();
|
|
46201
46202
|
if (!itemMbr || single?.itemType !== "Sticker" && single?.itemType !== "Shape" && single?.itemType !== "AINode" && single?.itemType !== "RichText") {
|
|
46202
46203
|
return;
|
|
46203
46204
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -46064,8 +46064,9 @@ function getQuickAddButtons(selection, board) {
|
|
|
46064
46064
|
let quickAddItems = undefined;
|
|
46065
46065
|
function calculateQuickAddPosition(index2, selectedItem, connectorStartPoint) {
|
|
46066
46066
|
const connectorStorage = new SessionStorage;
|
|
46067
|
-
const currMbr = selectedItem.getPathMbr();
|
|
46067
|
+
const currMbr = selectedItem instanceof BaseItem ? selectedItem.getWorldMbr() : selectedItem.getPathMbr();
|
|
46068
46068
|
const selectedItemData = selectedItem.serialize();
|
|
46069
|
+
const selectedMatrix = selectedItem instanceof BaseItem ? selectedItem.getWorldMatrix() : new Matrix(selectedItemData.transformation?.translateX || 0, selectedItemData.transformation?.translateY || 0);
|
|
46069
46070
|
const width2 = currMbr.getWidth();
|
|
46070
46071
|
const height3 = currMbr.getHeight();
|
|
46071
46072
|
let offsetX = width2;
|
|
@@ -46105,8 +46106,8 @@ function getQuickAddButtons(selection, board) {
|
|
|
46105
46106
|
const adjustment = baseAdjustments[index2];
|
|
46106
46107
|
const newItemData = { ...itemData };
|
|
46107
46108
|
if (newItemData.transformation) {
|
|
46108
|
-
newItemData.transformation.translateX = adjustment.translateX +
|
|
46109
|
-
newItemData.transformation.translateY = adjustment.translateY +
|
|
46109
|
+
newItemData.transformation.translateX = adjustment.translateX + selectedMatrix.translateX;
|
|
46110
|
+
newItemData.transformation.translateY = adjustment.translateY + selectedMatrix.translateY + height3 / 2 - newHeight / 2;
|
|
46110
46111
|
}
|
|
46111
46112
|
const newMbr = new Mbr(newItemData.transformation?.translateX, newItemData.transformation?.translateY, (newItemData.transformation?.translateX || 0) + newWidth, (newItemData.transformation?.translateY || 0) + newHeight);
|
|
46112
46113
|
let step = 1;
|
|
@@ -46197,7 +46198,7 @@ function getQuickAddButtons(selection, board) {
|
|
|
46197
46198
|
}
|
|
46198
46199
|
function getQuickButtonsPositions(customMbr) {
|
|
46199
46200
|
const single = selection.items.getSingle();
|
|
46200
|
-
const itemMbr = customMbr ? customMbr : single?.getMbr();
|
|
46201
|
+
const itemMbr = customMbr ? customMbr : single instanceof BaseItem ? single.getWorldMbr() : single?.getMbr();
|
|
46201
46202
|
if (!itemMbr || single?.itemType !== "Sticker" && single?.itemType !== "Shape" && single?.itemType !== "AINode" && single?.itemType !== "RichText") {
|
|
46202
46203
|
return;
|
|
46203
46204
|
}
|
package/dist/cjs/node.js
CHANGED
|
@@ -48537,8 +48537,9 @@ function getQuickAddButtons(selection, board) {
|
|
|
48537
48537
|
let quickAddItems = undefined;
|
|
48538
48538
|
function calculateQuickAddPosition(index2, selectedItem, connectorStartPoint) {
|
|
48539
48539
|
const connectorStorage = new SessionStorage;
|
|
48540
|
-
const currMbr = selectedItem.getPathMbr();
|
|
48540
|
+
const currMbr = selectedItem instanceof BaseItem ? selectedItem.getWorldMbr() : selectedItem.getPathMbr();
|
|
48541
48541
|
const selectedItemData = selectedItem.serialize();
|
|
48542
|
+
const selectedMatrix = selectedItem instanceof BaseItem ? selectedItem.getWorldMatrix() : new Matrix(selectedItemData.transformation?.translateX || 0, selectedItemData.transformation?.translateY || 0);
|
|
48542
48543
|
const width2 = currMbr.getWidth();
|
|
48543
48544
|
const height3 = currMbr.getHeight();
|
|
48544
48545
|
let offsetX = width2;
|
|
@@ -48578,8 +48579,8 @@ function getQuickAddButtons(selection, board) {
|
|
|
48578
48579
|
const adjustment = baseAdjustments[index2];
|
|
48579
48580
|
const newItemData = { ...itemData };
|
|
48580
48581
|
if (newItemData.transformation) {
|
|
48581
|
-
newItemData.transformation.translateX = adjustment.translateX +
|
|
48582
|
-
newItemData.transformation.translateY = adjustment.translateY +
|
|
48582
|
+
newItemData.transformation.translateX = adjustment.translateX + selectedMatrix.translateX;
|
|
48583
|
+
newItemData.transformation.translateY = adjustment.translateY + selectedMatrix.translateY + height3 / 2 - newHeight / 2;
|
|
48583
48584
|
}
|
|
48584
48585
|
const newMbr = new Mbr(newItemData.transformation?.translateX, newItemData.transformation?.translateY, (newItemData.transformation?.translateX || 0) + newWidth, (newItemData.transformation?.translateY || 0) + newHeight);
|
|
48585
48586
|
let step = 1;
|
|
@@ -48670,7 +48671,7 @@ function getQuickAddButtons(selection, board) {
|
|
|
48670
48671
|
}
|
|
48671
48672
|
function getQuickButtonsPositions(customMbr) {
|
|
48672
48673
|
const single = selection.items.getSingle();
|
|
48673
|
-
const itemMbr = customMbr ? customMbr : single?.getMbr();
|
|
48674
|
+
const itemMbr = customMbr ? customMbr : single instanceof BaseItem ? single.getWorldMbr() : single?.getMbr();
|
|
48674
48675
|
if (!itemMbr || single?.itemType !== "Sticker" && single?.itemType !== "Shape" && single?.itemType !== "AINode" && single?.itemType !== "RichText") {
|
|
48675
48676
|
return;
|
|
48676
48677
|
}
|
package/dist/esm/browser.js
CHANGED
|
@@ -45893,8 +45893,9 @@ function getQuickAddButtons(selection, board) {
|
|
|
45893
45893
|
let quickAddItems = undefined;
|
|
45894
45894
|
function calculateQuickAddPosition(index2, selectedItem, connectorStartPoint) {
|
|
45895
45895
|
const connectorStorage = new SessionStorage;
|
|
45896
|
-
const currMbr = selectedItem.getPathMbr();
|
|
45896
|
+
const currMbr = selectedItem instanceof BaseItem ? selectedItem.getWorldMbr() : selectedItem.getPathMbr();
|
|
45897
45897
|
const selectedItemData = selectedItem.serialize();
|
|
45898
|
+
const selectedMatrix = selectedItem instanceof BaseItem ? selectedItem.getWorldMatrix() : new Matrix(selectedItemData.transformation?.translateX || 0, selectedItemData.transformation?.translateY || 0);
|
|
45898
45899
|
const width2 = currMbr.getWidth();
|
|
45899
45900
|
const height3 = currMbr.getHeight();
|
|
45900
45901
|
let offsetX = width2;
|
|
@@ -45934,8 +45935,8 @@ function getQuickAddButtons(selection, board) {
|
|
|
45934
45935
|
const adjustment = baseAdjustments[index2];
|
|
45935
45936
|
const newItemData = { ...itemData };
|
|
45936
45937
|
if (newItemData.transformation) {
|
|
45937
|
-
newItemData.transformation.translateX = adjustment.translateX +
|
|
45938
|
-
newItemData.transformation.translateY = adjustment.translateY +
|
|
45938
|
+
newItemData.transformation.translateX = adjustment.translateX + selectedMatrix.translateX;
|
|
45939
|
+
newItemData.transformation.translateY = adjustment.translateY + selectedMatrix.translateY + height3 / 2 - newHeight / 2;
|
|
45939
45940
|
}
|
|
45940
45941
|
const newMbr = new Mbr(newItemData.transformation?.translateX, newItemData.transformation?.translateY, (newItemData.transformation?.translateX || 0) + newWidth, (newItemData.transformation?.translateY || 0) + newHeight);
|
|
45941
45942
|
let step = 1;
|
|
@@ -46026,7 +46027,7 @@ function getQuickAddButtons(selection, board) {
|
|
|
46026
46027
|
}
|
|
46027
46028
|
function getQuickButtonsPositions(customMbr) {
|
|
46028
46029
|
const single = selection.items.getSingle();
|
|
46029
|
-
const itemMbr = customMbr ? customMbr : single?.getMbr();
|
|
46030
|
+
const itemMbr = customMbr ? customMbr : single instanceof BaseItem ? single.getWorldMbr() : single?.getMbr();
|
|
46030
46031
|
if (!itemMbr || single?.itemType !== "Sticker" && single?.itemType !== "Shape" && single?.itemType !== "AINode" && single?.itemType !== "RichText") {
|
|
46031
46032
|
return;
|
|
46032
46033
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -45886,8 +45886,9 @@ function getQuickAddButtons(selection, board) {
|
|
|
45886
45886
|
let quickAddItems = undefined;
|
|
45887
45887
|
function calculateQuickAddPosition(index2, selectedItem, connectorStartPoint) {
|
|
45888
45888
|
const connectorStorage = new SessionStorage;
|
|
45889
|
-
const currMbr = selectedItem.getPathMbr();
|
|
45889
|
+
const currMbr = selectedItem instanceof BaseItem ? selectedItem.getWorldMbr() : selectedItem.getPathMbr();
|
|
45890
45890
|
const selectedItemData = selectedItem.serialize();
|
|
45891
|
+
const selectedMatrix = selectedItem instanceof BaseItem ? selectedItem.getWorldMatrix() : new Matrix(selectedItemData.transformation?.translateX || 0, selectedItemData.transformation?.translateY || 0);
|
|
45891
45892
|
const width2 = currMbr.getWidth();
|
|
45892
45893
|
const height3 = currMbr.getHeight();
|
|
45893
45894
|
let offsetX = width2;
|
|
@@ -45927,8 +45928,8 @@ function getQuickAddButtons(selection, board) {
|
|
|
45927
45928
|
const adjustment = baseAdjustments[index2];
|
|
45928
45929
|
const newItemData = { ...itemData };
|
|
45929
45930
|
if (newItemData.transformation) {
|
|
45930
|
-
newItemData.transformation.translateX = adjustment.translateX +
|
|
45931
|
-
newItemData.transformation.translateY = adjustment.translateY +
|
|
45931
|
+
newItemData.transformation.translateX = adjustment.translateX + selectedMatrix.translateX;
|
|
45932
|
+
newItemData.transformation.translateY = adjustment.translateY + selectedMatrix.translateY + height3 / 2 - newHeight / 2;
|
|
45932
45933
|
}
|
|
45933
45934
|
const newMbr = new Mbr(newItemData.transformation?.translateX, newItemData.transformation?.translateY, (newItemData.transformation?.translateX || 0) + newWidth, (newItemData.transformation?.translateY || 0) + newHeight);
|
|
45934
45935
|
let step = 1;
|
|
@@ -46019,7 +46020,7 @@ function getQuickAddButtons(selection, board) {
|
|
|
46019
46020
|
}
|
|
46020
46021
|
function getQuickButtonsPositions(customMbr) {
|
|
46021
46022
|
const single = selection.items.getSingle();
|
|
46022
|
-
const itemMbr = customMbr ? customMbr : single?.getMbr();
|
|
46023
|
+
const itemMbr = customMbr ? customMbr : single instanceof BaseItem ? single.getWorldMbr() : single?.getMbr();
|
|
46023
46024
|
if (!itemMbr || single?.itemType !== "Sticker" && single?.itemType !== "Shape" && single?.itemType !== "AINode" && single?.itemType !== "RichText") {
|
|
46024
46025
|
return;
|
|
46025
46026
|
}
|
package/dist/esm/node.js
CHANGED
|
@@ -48354,8 +48354,9 @@ function getQuickAddButtons(selection, board) {
|
|
|
48354
48354
|
let quickAddItems = undefined;
|
|
48355
48355
|
function calculateQuickAddPosition(index2, selectedItem, connectorStartPoint) {
|
|
48356
48356
|
const connectorStorage = new SessionStorage;
|
|
48357
|
-
const currMbr = selectedItem.getPathMbr();
|
|
48357
|
+
const currMbr = selectedItem instanceof BaseItem ? selectedItem.getWorldMbr() : selectedItem.getPathMbr();
|
|
48358
48358
|
const selectedItemData = selectedItem.serialize();
|
|
48359
|
+
const selectedMatrix = selectedItem instanceof BaseItem ? selectedItem.getWorldMatrix() : new Matrix(selectedItemData.transformation?.translateX || 0, selectedItemData.transformation?.translateY || 0);
|
|
48359
48360
|
const width2 = currMbr.getWidth();
|
|
48360
48361
|
const height3 = currMbr.getHeight();
|
|
48361
48362
|
let offsetX = width2;
|
|
@@ -48395,8 +48396,8 @@ function getQuickAddButtons(selection, board) {
|
|
|
48395
48396
|
const adjustment = baseAdjustments[index2];
|
|
48396
48397
|
const newItemData = { ...itemData };
|
|
48397
48398
|
if (newItemData.transformation) {
|
|
48398
|
-
newItemData.transformation.translateX = adjustment.translateX +
|
|
48399
|
-
newItemData.transformation.translateY = adjustment.translateY +
|
|
48399
|
+
newItemData.transformation.translateX = adjustment.translateX + selectedMatrix.translateX;
|
|
48400
|
+
newItemData.transformation.translateY = adjustment.translateY + selectedMatrix.translateY + height3 / 2 - newHeight / 2;
|
|
48400
48401
|
}
|
|
48401
48402
|
const newMbr = new Mbr(newItemData.transformation?.translateX, newItemData.transformation?.translateY, (newItemData.transformation?.translateX || 0) + newWidth, (newItemData.transformation?.translateY || 0) + newHeight);
|
|
48402
48403
|
let step = 1;
|
|
@@ -48487,7 +48488,7 @@ function getQuickAddButtons(selection, board) {
|
|
|
48487
48488
|
}
|
|
48488
48489
|
function getQuickButtonsPositions(customMbr) {
|
|
48489
48490
|
const single = selection.items.getSingle();
|
|
48490
|
-
const itemMbr = customMbr ? customMbr : single?.getMbr();
|
|
48491
|
+
const itemMbr = customMbr ? customMbr : single instanceof BaseItem ? single.getWorldMbr() : single?.getMbr();
|
|
48491
48492
|
if (!itemMbr || single?.itemType !== "Sticker" && single?.itemType !== "Shape" && single?.itemType !== "AINode" && single?.itemType !== "RichText") {
|
|
48492
48493
|
return;
|
|
48493
48494
|
}
|