microboard-temp 0.14.7 → 0.14.9
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
|
@@ -44105,11 +44105,13 @@ class Connector2 extends BaseItem {
|
|
|
44105
44105
|
this.updatePaths();
|
|
44106
44106
|
}
|
|
44107
44107
|
applyStartPoint(pointData, updatePath = true) {
|
|
44108
|
+
const optionalFn = this.getOptionalFindFn();
|
|
44109
|
+
const findItem2 = optionalFn ? optionalFn : (itemId) => this.board.items.findById(itemId);
|
|
44108
44110
|
if (pointData.pointType !== "Board" && this.startPoint.pointType !== "Board" && pointData.itemId === this.startPoint.item.getId()) {
|
|
44109
|
-
this.startPoint = getControlPoint(pointData,
|
|
44111
|
+
this.startPoint = getControlPoint(pointData, findItem2);
|
|
44110
44112
|
} else {
|
|
44111
44113
|
this.unsubscribeFromItem(this.startPoint, this.observerStartPointItem);
|
|
44112
|
-
this.startPoint = getControlPoint(pointData,
|
|
44114
|
+
this.startPoint = getControlPoint(pointData, findItem2);
|
|
44113
44115
|
this.subscribeToItem(this.startPoint, this.observerStartPointItem);
|
|
44114
44116
|
}
|
|
44115
44117
|
if (updatePath) {
|
|
@@ -69989,11 +69991,12 @@ class AddConnector extends BoardTool {
|
|
|
69989
69991
|
this.isDown = true;
|
|
69990
69992
|
this.isQuickAdd = true;
|
|
69991
69993
|
const closestPoint = this.snap.getClosestPointOnItem(itemToStart, position4);
|
|
69994
|
+
const serializedPoint = "serialize" in closestPoint ? closestPoint.serialize() : closestPoint;
|
|
69992
69995
|
this.connector = new Connector2(this.board);
|
|
69993
69996
|
this.connector.deserialize({
|
|
69994
69997
|
itemType: "Connector",
|
|
69995
|
-
startPoint:
|
|
69996
|
-
endPoint:
|
|
69998
|
+
startPoint: serializedPoint,
|
|
69999
|
+
endPoint: serializedPoint,
|
|
69997
70000
|
lineStyle: this.lineStyle,
|
|
69998
70001
|
startPointer: this.startPointer,
|
|
69999
70002
|
endPointer: this.endPointer,
|
|
@@ -70009,12 +70012,13 @@ class AddConnector extends BoardTool {
|
|
|
70009
70012
|
leftButtonDown() {
|
|
70010
70013
|
this.isDown = true;
|
|
70011
70014
|
const point5 = this.snap.getControlPoint();
|
|
70015
|
+
const serializedPoint = "serialize" in point5 ? point5.serialize() : point5;
|
|
70012
70016
|
if (!this.connector) {
|
|
70013
70017
|
this.connector = new Connector2(this.board);
|
|
70014
70018
|
this.connector.deserialize({
|
|
70015
70019
|
itemType: "Connector",
|
|
70016
|
-
startPoint:
|
|
70017
|
-
endPoint:
|
|
70020
|
+
startPoint: serializedPoint,
|
|
70021
|
+
endPoint: serializedPoint,
|
|
70018
70022
|
lineStyle: this.lineStyle,
|
|
70019
70023
|
startPointer: this.startPointer,
|
|
70020
70024
|
endPointer: this.endPointer,
|
package/dist/cjs/index.js
CHANGED
|
@@ -44105,11 +44105,13 @@ class Connector2 extends BaseItem {
|
|
|
44105
44105
|
this.updatePaths();
|
|
44106
44106
|
}
|
|
44107
44107
|
applyStartPoint(pointData, updatePath = true) {
|
|
44108
|
+
const optionalFn = this.getOptionalFindFn();
|
|
44109
|
+
const findItem2 = optionalFn ? optionalFn : (itemId) => this.board.items.findById(itemId);
|
|
44108
44110
|
if (pointData.pointType !== "Board" && this.startPoint.pointType !== "Board" && pointData.itemId === this.startPoint.item.getId()) {
|
|
44109
|
-
this.startPoint = getControlPoint(pointData,
|
|
44111
|
+
this.startPoint = getControlPoint(pointData, findItem2);
|
|
44110
44112
|
} else {
|
|
44111
44113
|
this.unsubscribeFromItem(this.startPoint, this.observerStartPointItem);
|
|
44112
|
-
this.startPoint = getControlPoint(pointData,
|
|
44114
|
+
this.startPoint = getControlPoint(pointData, findItem2);
|
|
44113
44115
|
this.subscribeToItem(this.startPoint, this.observerStartPointItem);
|
|
44114
44116
|
}
|
|
44115
44117
|
if (updatePath) {
|
|
@@ -69989,11 +69991,12 @@ class AddConnector extends BoardTool {
|
|
|
69989
69991
|
this.isDown = true;
|
|
69990
69992
|
this.isQuickAdd = true;
|
|
69991
69993
|
const closestPoint = this.snap.getClosestPointOnItem(itemToStart, position4);
|
|
69994
|
+
const serializedPoint = "serialize" in closestPoint ? closestPoint.serialize() : closestPoint;
|
|
69992
69995
|
this.connector = new Connector2(this.board);
|
|
69993
69996
|
this.connector.deserialize({
|
|
69994
69997
|
itemType: "Connector",
|
|
69995
|
-
startPoint:
|
|
69996
|
-
endPoint:
|
|
69998
|
+
startPoint: serializedPoint,
|
|
69999
|
+
endPoint: serializedPoint,
|
|
69997
70000
|
lineStyle: this.lineStyle,
|
|
69998
70001
|
startPointer: this.startPointer,
|
|
69999
70002
|
endPointer: this.endPointer,
|
|
@@ -70009,12 +70012,13 @@ class AddConnector extends BoardTool {
|
|
|
70009
70012
|
leftButtonDown() {
|
|
70010
70013
|
this.isDown = true;
|
|
70011
70014
|
const point5 = this.snap.getControlPoint();
|
|
70015
|
+
const serializedPoint = "serialize" in point5 ? point5.serialize() : point5;
|
|
70012
70016
|
if (!this.connector) {
|
|
70013
70017
|
this.connector = new Connector2(this.board);
|
|
70014
70018
|
this.connector.deserialize({
|
|
70015
70019
|
itemType: "Connector",
|
|
70016
|
-
startPoint:
|
|
70017
|
-
endPoint:
|
|
70020
|
+
startPoint: serializedPoint,
|
|
70021
|
+
endPoint: serializedPoint,
|
|
70018
70022
|
lineStyle: this.lineStyle,
|
|
70019
70023
|
startPointer: this.startPointer,
|
|
70020
70024
|
endPointer: this.endPointer,
|
package/dist/cjs/node.js
CHANGED
|
@@ -46577,11 +46577,13 @@ class Connector2 extends BaseItem {
|
|
|
46577
46577
|
this.updatePaths();
|
|
46578
46578
|
}
|
|
46579
46579
|
applyStartPoint(pointData, updatePath = true) {
|
|
46580
|
+
const optionalFn = this.getOptionalFindFn();
|
|
46581
|
+
const findItem2 = optionalFn ? optionalFn : (itemId) => this.board.items.findById(itemId);
|
|
46580
46582
|
if (pointData.pointType !== "Board" && this.startPoint.pointType !== "Board" && pointData.itemId === this.startPoint.item.getId()) {
|
|
46581
|
-
this.startPoint = getControlPoint(pointData,
|
|
46583
|
+
this.startPoint = getControlPoint(pointData, findItem2);
|
|
46582
46584
|
} else {
|
|
46583
46585
|
this.unsubscribeFromItem(this.startPoint, this.observerStartPointItem);
|
|
46584
|
-
this.startPoint = getControlPoint(pointData,
|
|
46586
|
+
this.startPoint = getControlPoint(pointData, findItem2);
|
|
46585
46587
|
this.subscribeToItem(this.startPoint, this.observerStartPointItem);
|
|
46586
46588
|
}
|
|
46587
46589
|
if (updatePath) {
|
|
@@ -72462,11 +72464,12 @@ class AddConnector extends BoardTool {
|
|
|
72462
72464
|
this.isDown = true;
|
|
72463
72465
|
this.isQuickAdd = true;
|
|
72464
72466
|
const closestPoint = this.snap.getClosestPointOnItem(itemToStart, position4);
|
|
72467
|
+
const serializedPoint = "serialize" in closestPoint ? closestPoint.serialize() : closestPoint;
|
|
72465
72468
|
this.connector = new Connector2(this.board);
|
|
72466
72469
|
this.connector.deserialize({
|
|
72467
72470
|
itemType: "Connector",
|
|
72468
|
-
startPoint:
|
|
72469
|
-
endPoint:
|
|
72471
|
+
startPoint: serializedPoint,
|
|
72472
|
+
endPoint: serializedPoint,
|
|
72470
72473
|
lineStyle: this.lineStyle,
|
|
72471
72474
|
startPointer: this.startPointer,
|
|
72472
72475
|
endPointer: this.endPointer,
|
|
@@ -72482,12 +72485,13 @@ class AddConnector extends BoardTool {
|
|
|
72482
72485
|
leftButtonDown() {
|
|
72483
72486
|
this.isDown = true;
|
|
72484
72487
|
const point5 = this.snap.getControlPoint();
|
|
72488
|
+
const serializedPoint = "serialize" in point5 ? point5.serialize() : point5;
|
|
72485
72489
|
if (!this.connector) {
|
|
72486
72490
|
this.connector = new Connector2(this.board);
|
|
72487
72491
|
this.connector.deserialize({
|
|
72488
72492
|
itemType: "Connector",
|
|
72489
|
-
startPoint:
|
|
72490
|
-
endPoint:
|
|
72493
|
+
startPoint: serializedPoint,
|
|
72494
|
+
endPoint: serializedPoint,
|
|
72491
72495
|
lineStyle: this.lineStyle,
|
|
72492
72496
|
startPointer: this.startPointer,
|
|
72493
72497
|
endPointer: this.endPointer,
|
package/dist/esm/browser.js
CHANGED
|
@@ -43916,11 +43916,13 @@ class Connector2 extends BaseItem {
|
|
|
43916
43916
|
this.updatePaths();
|
|
43917
43917
|
}
|
|
43918
43918
|
applyStartPoint(pointData, updatePath = true) {
|
|
43919
|
+
const optionalFn = this.getOptionalFindFn();
|
|
43920
|
+
const findItem2 = optionalFn ? optionalFn : (itemId) => this.board.items.findById(itemId);
|
|
43919
43921
|
if (pointData.pointType !== "Board" && this.startPoint.pointType !== "Board" && pointData.itemId === this.startPoint.item.getId()) {
|
|
43920
|
-
this.startPoint = getControlPoint(pointData,
|
|
43922
|
+
this.startPoint = getControlPoint(pointData, findItem2);
|
|
43921
43923
|
} else {
|
|
43922
43924
|
this.unsubscribeFromItem(this.startPoint, this.observerStartPointItem);
|
|
43923
|
-
this.startPoint = getControlPoint(pointData,
|
|
43925
|
+
this.startPoint = getControlPoint(pointData, findItem2);
|
|
43924
43926
|
this.subscribeToItem(this.startPoint, this.observerStartPointItem);
|
|
43925
43927
|
}
|
|
43926
43928
|
if (updatePath) {
|
|
@@ -69800,11 +69802,12 @@ class AddConnector extends BoardTool {
|
|
|
69800
69802
|
this.isDown = true;
|
|
69801
69803
|
this.isQuickAdd = true;
|
|
69802
69804
|
const closestPoint = this.snap.getClosestPointOnItem(itemToStart, position4);
|
|
69805
|
+
const serializedPoint = "serialize" in closestPoint ? closestPoint.serialize() : closestPoint;
|
|
69803
69806
|
this.connector = new Connector2(this.board);
|
|
69804
69807
|
this.connector.deserialize({
|
|
69805
69808
|
itemType: "Connector",
|
|
69806
|
-
startPoint:
|
|
69807
|
-
endPoint:
|
|
69809
|
+
startPoint: serializedPoint,
|
|
69810
|
+
endPoint: serializedPoint,
|
|
69808
69811
|
lineStyle: this.lineStyle,
|
|
69809
69812
|
startPointer: this.startPointer,
|
|
69810
69813
|
endPointer: this.endPointer,
|
|
@@ -69820,12 +69823,13 @@ class AddConnector extends BoardTool {
|
|
|
69820
69823
|
leftButtonDown() {
|
|
69821
69824
|
this.isDown = true;
|
|
69822
69825
|
const point5 = this.snap.getControlPoint();
|
|
69826
|
+
const serializedPoint = "serialize" in point5 ? point5.serialize() : point5;
|
|
69823
69827
|
if (!this.connector) {
|
|
69824
69828
|
this.connector = new Connector2(this.board);
|
|
69825
69829
|
this.connector.deserialize({
|
|
69826
69830
|
itemType: "Connector",
|
|
69827
|
-
startPoint:
|
|
69828
|
-
endPoint:
|
|
69831
|
+
startPoint: serializedPoint,
|
|
69832
|
+
endPoint: serializedPoint,
|
|
69829
69833
|
lineStyle: this.lineStyle,
|
|
69830
69834
|
startPointer: this.startPointer,
|
|
69831
69835
|
endPointer: this.endPointer,
|
package/dist/esm/index.js
CHANGED
|
@@ -43909,11 +43909,13 @@ class Connector2 extends BaseItem {
|
|
|
43909
43909
|
this.updatePaths();
|
|
43910
43910
|
}
|
|
43911
43911
|
applyStartPoint(pointData, updatePath = true) {
|
|
43912
|
+
const optionalFn = this.getOptionalFindFn();
|
|
43913
|
+
const findItem2 = optionalFn ? optionalFn : (itemId) => this.board.items.findById(itemId);
|
|
43912
43914
|
if (pointData.pointType !== "Board" && this.startPoint.pointType !== "Board" && pointData.itemId === this.startPoint.item.getId()) {
|
|
43913
|
-
this.startPoint = getControlPoint(pointData,
|
|
43915
|
+
this.startPoint = getControlPoint(pointData, findItem2);
|
|
43914
43916
|
} else {
|
|
43915
43917
|
this.unsubscribeFromItem(this.startPoint, this.observerStartPointItem);
|
|
43916
|
-
this.startPoint = getControlPoint(pointData,
|
|
43918
|
+
this.startPoint = getControlPoint(pointData, findItem2);
|
|
43917
43919
|
this.subscribeToItem(this.startPoint, this.observerStartPointItem);
|
|
43918
43920
|
}
|
|
43919
43921
|
if (updatePath) {
|
|
@@ -69793,11 +69795,12 @@ class AddConnector extends BoardTool {
|
|
|
69793
69795
|
this.isDown = true;
|
|
69794
69796
|
this.isQuickAdd = true;
|
|
69795
69797
|
const closestPoint = this.snap.getClosestPointOnItem(itemToStart, position4);
|
|
69798
|
+
const serializedPoint = "serialize" in closestPoint ? closestPoint.serialize() : closestPoint;
|
|
69796
69799
|
this.connector = new Connector2(this.board);
|
|
69797
69800
|
this.connector.deserialize({
|
|
69798
69801
|
itemType: "Connector",
|
|
69799
|
-
startPoint:
|
|
69800
|
-
endPoint:
|
|
69802
|
+
startPoint: serializedPoint,
|
|
69803
|
+
endPoint: serializedPoint,
|
|
69801
69804
|
lineStyle: this.lineStyle,
|
|
69802
69805
|
startPointer: this.startPointer,
|
|
69803
69806
|
endPointer: this.endPointer,
|
|
@@ -69813,12 +69816,13 @@ class AddConnector extends BoardTool {
|
|
|
69813
69816
|
leftButtonDown() {
|
|
69814
69817
|
this.isDown = true;
|
|
69815
69818
|
const point5 = this.snap.getControlPoint();
|
|
69819
|
+
const serializedPoint = "serialize" in point5 ? point5.serialize() : point5;
|
|
69816
69820
|
if (!this.connector) {
|
|
69817
69821
|
this.connector = new Connector2(this.board);
|
|
69818
69822
|
this.connector.deserialize({
|
|
69819
69823
|
itemType: "Connector",
|
|
69820
|
-
startPoint:
|
|
69821
|
-
endPoint:
|
|
69824
|
+
startPoint: serializedPoint,
|
|
69825
|
+
endPoint: serializedPoint,
|
|
69822
69826
|
lineStyle: this.lineStyle,
|
|
69823
69827
|
startPointer: this.startPointer,
|
|
69824
69828
|
endPointer: this.endPointer,
|
package/dist/esm/node.js
CHANGED
|
@@ -46376,11 +46376,13 @@ class Connector2 extends BaseItem {
|
|
|
46376
46376
|
this.updatePaths();
|
|
46377
46377
|
}
|
|
46378
46378
|
applyStartPoint(pointData, updatePath = true) {
|
|
46379
|
+
const optionalFn = this.getOptionalFindFn();
|
|
46380
|
+
const findItem2 = optionalFn ? optionalFn : (itemId) => this.board.items.findById(itemId);
|
|
46379
46381
|
if (pointData.pointType !== "Board" && this.startPoint.pointType !== "Board" && pointData.itemId === this.startPoint.item.getId()) {
|
|
46380
|
-
this.startPoint = getControlPoint(pointData,
|
|
46382
|
+
this.startPoint = getControlPoint(pointData, findItem2);
|
|
46381
46383
|
} else {
|
|
46382
46384
|
this.unsubscribeFromItem(this.startPoint, this.observerStartPointItem);
|
|
46383
|
-
this.startPoint = getControlPoint(pointData,
|
|
46385
|
+
this.startPoint = getControlPoint(pointData, findItem2);
|
|
46384
46386
|
this.subscribeToItem(this.startPoint, this.observerStartPointItem);
|
|
46385
46387
|
}
|
|
46386
46388
|
if (updatePath) {
|
|
@@ -72261,11 +72263,12 @@ class AddConnector extends BoardTool {
|
|
|
72261
72263
|
this.isDown = true;
|
|
72262
72264
|
this.isQuickAdd = true;
|
|
72263
72265
|
const closestPoint = this.snap.getClosestPointOnItem(itemToStart, position4);
|
|
72266
|
+
const serializedPoint = "serialize" in closestPoint ? closestPoint.serialize() : closestPoint;
|
|
72264
72267
|
this.connector = new Connector2(this.board);
|
|
72265
72268
|
this.connector.deserialize({
|
|
72266
72269
|
itemType: "Connector",
|
|
72267
|
-
startPoint:
|
|
72268
|
-
endPoint:
|
|
72270
|
+
startPoint: serializedPoint,
|
|
72271
|
+
endPoint: serializedPoint,
|
|
72269
72272
|
lineStyle: this.lineStyle,
|
|
72270
72273
|
startPointer: this.startPointer,
|
|
72271
72274
|
endPointer: this.endPointer,
|
|
@@ -72281,12 +72284,13 @@ class AddConnector extends BoardTool {
|
|
|
72281
72284
|
leftButtonDown() {
|
|
72282
72285
|
this.isDown = true;
|
|
72283
72286
|
const point5 = this.snap.getControlPoint();
|
|
72287
|
+
const serializedPoint = "serialize" in point5 ? point5.serialize() : point5;
|
|
72284
72288
|
if (!this.connector) {
|
|
72285
72289
|
this.connector = new Connector2(this.board);
|
|
72286
72290
|
this.connector.deserialize({
|
|
72287
72291
|
itemType: "Connector",
|
|
72288
|
-
startPoint:
|
|
72289
|
-
endPoint:
|
|
72292
|
+
startPoint: serializedPoint,
|
|
72293
|
+
endPoint: serializedPoint,
|
|
72290
72294
|
lineStyle: this.lineStyle,
|
|
72291
72295
|
startPointer: this.startPointer,
|
|
72292
72296
|
endPointer: this.endPointer,
|