microboard-temp 0.14.12 → 0.14.14
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 +58 -8
- package/dist/cjs/index.js +58 -8
- package/dist/cjs/node.js +58 -8
- package/dist/esm/browser.js +58 -8
- package/dist/esm/index.js +58 -8
- package/dist/esm/node.js +58 -8
- package/dist/types/Items/Connector/Connector.d.ts +1 -0
- package/dist/types/Items/Connector/connectorOps.d.ts +1 -0
- package/dist/types/SessionStorage.d.ts +2 -0
- package/dist/types/Tools/AddConnector/AddConnector.d.ts +1 -0
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -7583,6 +7583,17 @@ class ConnectorCommand {
|
|
|
7583
7583
|
});
|
|
7584
7584
|
}
|
|
7585
7585
|
break;
|
|
7586
|
+
case "setSmartJump":
|
|
7587
|
+
for (const connector of this.connector) {
|
|
7588
|
+
reverse.push({
|
|
7589
|
+
item: connector,
|
|
7590
|
+
operation: {
|
|
7591
|
+
...this.operation,
|
|
7592
|
+
smartJump: connector.getSmartJump()
|
|
7593
|
+
}
|
|
7594
|
+
});
|
|
7595
|
+
}
|
|
7596
|
+
break;
|
|
7586
7597
|
}
|
|
7587
7598
|
return reverse;
|
|
7588
7599
|
}
|
|
@@ -27674,6 +27685,12 @@ class SessionStorage {
|
|
|
27674
27685
|
getConnectorLineStyle() {
|
|
27675
27686
|
return this.get("connectorLineStyle");
|
|
27676
27687
|
}
|
|
27688
|
+
setConnectorSmartJump(enabled) {
|
|
27689
|
+
this.set("connectorSmartJump", enabled);
|
|
27690
|
+
}
|
|
27691
|
+
getConnectorSmartJump() {
|
|
27692
|
+
return this.get("connectorSmartJump");
|
|
27693
|
+
}
|
|
27677
27694
|
setShapeData(data) {
|
|
27678
27695
|
this.set("lastShapeData", data);
|
|
27679
27696
|
}
|
|
@@ -43718,6 +43735,12 @@ var connectorOps = {
|
|
|
43718
43735
|
class: "Connector",
|
|
43719
43736
|
method: "switchPointers",
|
|
43720
43737
|
item: items.map((i) => i.getId())
|
|
43738
|
+
}),
|
|
43739
|
+
setSmartJump: (items, smartJump) => ({
|
|
43740
|
+
class: "Connector",
|
|
43741
|
+
method: "setSmartJump",
|
|
43742
|
+
item: items.map((i) => i.getId()),
|
|
43743
|
+
smartJump
|
|
43721
43744
|
})
|
|
43722
43745
|
};
|
|
43723
43746
|
|
|
@@ -43824,6 +43847,10 @@ class Connector2 extends BaseItem {
|
|
|
43824
43847
|
this.lineColor = semanticColor("contrastNeutral");
|
|
43825
43848
|
this.lineWidth = CONNECTOR_LINE_WIDTH;
|
|
43826
43849
|
this.borderStyle = CONNECTOR_BORDER_STYLE;
|
|
43850
|
+
const savedSmartJump = new SessionStorage().getConnectorSmartJump();
|
|
43851
|
+
if (savedSmartJump !== undefined) {
|
|
43852
|
+
this.smartJump = savedSmartJump;
|
|
43853
|
+
}
|
|
43827
43854
|
this.text = new RichText(this.board, this.id);
|
|
43828
43855
|
this.text.container = this.getMbr();
|
|
43829
43856
|
this.text.transformation = new Transformation;
|
|
@@ -43875,12 +43902,17 @@ class Connector2 extends BaseItem {
|
|
|
43875
43902
|
observerStartPointItem = () => {
|
|
43876
43903
|
const point3 = this.startPoint;
|
|
43877
43904
|
if (point3.pointType !== "Board") {
|
|
43905
|
+
if (Group.movingGroupId !== null) {
|
|
43906
|
+
point3.recalculatePoint();
|
|
43907
|
+
this.updatePaths();
|
|
43908
|
+
this.subject.publish(this);
|
|
43909
|
+
return;
|
|
43910
|
+
}
|
|
43878
43911
|
if (this.handleItemGeometryChange(point3, true))
|
|
43879
43912
|
return;
|
|
43880
43913
|
point3.recalculatePoint();
|
|
43881
|
-
const
|
|
43882
|
-
const
|
|
43883
|
-
const j2 = isGroupMoving ? false : this.smartJumpEndEdge();
|
|
43914
|
+
const j1 = this.smartJumpStartEdge();
|
|
43915
|
+
const j2 = this.smartJumpEndEdge();
|
|
43884
43916
|
if (!j1 && !j2) {
|
|
43885
43917
|
this.updatePaths();
|
|
43886
43918
|
this.subject.publish(this);
|
|
@@ -43890,12 +43922,17 @@ class Connector2 extends BaseItem {
|
|
|
43890
43922
|
observerEndPointItem = () => {
|
|
43891
43923
|
const point3 = this.endPoint;
|
|
43892
43924
|
if (point3.pointType !== "Board") {
|
|
43925
|
+
if (Group.movingGroupId !== null) {
|
|
43926
|
+
point3.recalculatePoint();
|
|
43927
|
+
this.updatePaths();
|
|
43928
|
+
this.subject.publish(this);
|
|
43929
|
+
return;
|
|
43930
|
+
}
|
|
43893
43931
|
if (this.handleItemGeometryChange(point3, false))
|
|
43894
43932
|
return;
|
|
43895
43933
|
point3.recalculatePoint();
|
|
43896
|
-
const
|
|
43897
|
-
const
|
|
43898
|
-
const j2 = isGroupMoving ? false : this.smartJumpStartEdge();
|
|
43934
|
+
const j1 = this.smartJumpEndEdge();
|
|
43935
|
+
const j2 = this.smartJumpStartEdge();
|
|
43899
43936
|
if (!j1 && !j2) {
|
|
43900
43937
|
this.updatePaths();
|
|
43901
43938
|
this.subject.publish(this);
|
|
@@ -44008,6 +44045,9 @@ class Connector2 extends BaseItem {
|
|
|
44008
44045
|
getSmartJump() {
|
|
44009
44046
|
return this.smartJump;
|
|
44010
44047
|
}
|
|
44048
|
+
setSmartJump(value) {
|
|
44049
|
+
this.emit(connectorOps.setSmartJump([this], value));
|
|
44050
|
+
}
|
|
44011
44051
|
clearObservedItems() {
|
|
44012
44052
|
const startPoint = this.getStartPoint();
|
|
44013
44053
|
const endPoint = this.getEndPoint();
|
|
@@ -44086,6 +44126,9 @@ class Connector2 extends BaseItem {
|
|
|
44086
44126
|
case "switchPointers":
|
|
44087
44127
|
this.applySwitchPointers();
|
|
44088
44128
|
break;
|
|
44129
|
+
case "setSmartJump":
|
|
44130
|
+
this.applySmartJump(operation.smartJump);
|
|
44131
|
+
break;
|
|
44089
44132
|
}
|
|
44090
44133
|
break;
|
|
44091
44134
|
default:
|
|
@@ -69962,6 +70005,7 @@ class AddConnector extends BoardTool {
|
|
|
69962
70005
|
lineColor;
|
|
69963
70006
|
lineWidth;
|
|
69964
70007
|
strokeStyle;
|
|
70008
|
+
smartJump = true;
|
|
69965
70009
|
snap;
|
|
69966
70010
|
isDraggingFromFirstToSecond = false;
|
|
69967
70011
|
isDoneSecondPoint = false;
|
|
@@ -69988,6 +70032,10 @@ class AddConnector extends BoardTool {
|
|
|
69988
70032
|
if (savedStyle) {
|
|
69989
70033
|
this.lineStyle = savedStyle;
|
|
69990
70034
|
}
|
|
70035
|
+
const savedSmartJump = storage.getConnectorSmartJump();
|
|
70036
|
+
if (savedSmartJump !== undefined) {
|
|
70037
|
+
this.smartJump = savedSmartJump;
|
|
70038
|
+
}
|
|
69991
70039
|
const savedStart = storage.getConnectorPointer("start");
|
|
69992
70040
|
if (savedStart) {
|
|
69993
70041
|
this.startPointer = savedStart;
|
|
@@ -70011,7 +70059,8 @@ class AddConnector extends BoardTool {
|
|
|
70011
70059
|
endPointer: this.endPointer,
|
|
70012
70060
|
lineColor: coerceOptionalColorValue(this.lineColor),
|
|
70013
70061
|
lineWidth: this.lineWidth,
|
|
70014
|
-
strokeStyle: this.strokeStyle
|
|
70062
|
+
strokeStyle: this.strokeStyle,
|
|
70063
|
+
smartJump: this.smartJump
|
|
70015
70064
|
});
|
|
70016
70065
|
}
|
|
70017
70066
|
}
|
|
@@ -70033,7 +70082,8 @@ class AddConnector extends BoardTool {
|
|
|
70033
70082
|
endPointer: this.endPointer,
|
|
70034
70083
|
lineColor: coerceOptionalColorValue(this.lineColor),
|
|
70035
70084
|
lineWidth: this.lineWidth,
|
|
70036
|
-
strokeStyle: this.strokeStyle
|
|
70085
|
+
strokeStyle: this.strokeStyle,
|
|
70086
|
+
smartJump: this.smartJump
|
|
70037
70087
|
});
|
|
70038
70088
|
} else {
|
|
70039
70089
|
this.connector.apply({
|
package/dist/cjs/index.js
CHANGED
|
@@ -7583,6 +7583,17 @@ class ConnectorCommand {
|
|
|
7583
7583
|
});
|
|
7584
7584
|
}
|
|
7585
7585
|
break;
|
|
7586
|
+
case "setSmartJump":
|
|
7587
|
+
for (const connector of this.connector) {
|
|
7588
|
+
reverse.push({
|
|
7589
|
+
item: connector,
|
|
7590
|
+
operation: {
|
|
7591
|
+
...this.operation,
|
|
7592
|
+
smartJump: connector.getSmartJump()
|
|
7593
|
+
}
|
|
7594
|
+
});
|
|
7595
|
+
}
|
|
7596
|
+
break;
|
|
7586
7597
|
}
|
|
7587
7598
|
return reverse;
|
|
7588
7599
|
}
|
|
@@ -27674,6 +27685,12 @@ class SessionStorage {
|
|
|
27674
27685
|
getConnectorLineStyle() {
|
|
27675
27686
|
return this.get("connectorLineStyle");
|
|
27676
27687
|
}
|
|
27688
|
+
setConnectorSmartJump(enabled) {
|
|
27689
|
+
this.set("connectorSmartJump", enabled);
|
|
27690
|
+
}
|
|
27691
|
+
getConnectorSmartJump() {
|
|
27692
|
+
return this.get("connectorSmartJump");
|
|
27693
|
+
}
|
|
27677
27694
|
setShapeData(data) {
|
|
27678
27695
|
this.set("lastShapeData", data);
|
|
27679
27696
|
}
|
|
@@ -43718,6 +43735,12 @@ var connectorOps = {
|
|
|
43718
43735
|
class: "Connector",
|
|
43719
43736
|
method: "switchPointers",
|
|
43720
43737
|
item: items.map((i) => i.getId())
|
|
43738
|
+
}),
|
|
43739
|
+
setSmartJump: (items, smartJump) => ({
|
|
43740
|
+
class: "Connector",
|
|
43741
|
+
method: "setSmartJump",
|
|
43742
|
+
item: items.map((i) => i.getId()),
|
|
43743
|
+
smartJump
|
|
43721
43744
|
})
|
|
43722
43745
|
};
|
|
43723
43746
|
|
|
@@ -43824,6 +43847,10 @@ class Connector2 extends BaseItem {
|
|
|
43824
43847
|
this.lineColor = semanticColor("contrastNeutral");
|
|
43825
43848
|
this.lineWidth = CONNECTOR_LINE_WIDTH;
|
|
43826
43849
|
this.borderStyle = CONNECTOR_BORDER_STYLE;
|
|
43850
|
+
const savedSmartJump = new SessionStorage().getConnectorSmartJump();
|
|
43851
|
+
if (savedSmartJump !== undefined) {
|
|
43852
|
+
this.smartJump = savedSmartJump;
|
|
43853
|
+
}
|
|
43827
43854
|
this.text = new RichText(this.board, this.id);
|
|
43828
43855
|
this.text.container = this.getMbr();
|
|
43829
43856
|
this.text.transformation = new Transformation;
|
|
@@ -43875,12 +43902,17 @@ class Connector2 extends BaseItem {
|
|
|
43875
43902
|
observerStartPointItem = () => {
|
|
43876
43903
|
const point3 = this.startPoint;
|
|
43877
43904
|
if (point3.pointType !== "Board") {
|
|
43905
|
+
if (Group.movingGroupId !== null) {
|
|
43906
|
+
point3.recalculatePoint();
|
|
43907
|
+
this.updatePaths();
|
|
43908
|
+
this.subject.publish(this);
|
|
43909
|
+
return;
|
|
43910
|
+
}
|
|
43878
43911
|
if (this.handleItemGeometryChange(point3, true))
|
|
43879
43912
|
return;
|
|
43880
43913
|
point3.recalculatePoint();
|
|
43881
|
-
const
|
|
43882
|
-
const
|
|
43883
|
-
const j2 = isGroupMoving ? false : this.smartJumpEndEdge();
|
|
43914
|
+
const j1 = this.smartJumpStartEdge();
|
|
43915
|
+
const j2 = this.smartJumpEndEdge();
|
|
43884
43916
|
if (!j1 && !j2) {
|
|
43885
43917
|
this.updatePaths();
|
|
43886
43918
|
this.subject.publish(this);
|
|
@@ -43890,12 +43922,17 @@ class Connector2 extends BaseItem {
|
|
|
43890
43922
|
observerEndPointItem = () => {
|
|
43891
43923
|
const point3 = this.endPoint;
|
|
43892
43924
|
if (point3.pointType !== "Board") {
|
|
43925
|
+
if (Group.movingGroupId !== null) {
|
|
43926
|
+
point3.recalculatePoint();
|
|
43927
|
+
this.updatePaths();
|
|
43928
|
+
this.subject.publish(this);
|
|
43929
|
+
return;
|
|
43930
|
+
}
|
|
43893
43931
|
if (this.handleItemGeometryChange(point3, false))
|
|
43894
43932
|
return;
|
|
43895
43933
|
point3.recalculatePoint();
|
|
43896
|
-
const
|
|
43897
|
-
const
|
|
43898
|
-
const j2 = isGroupMoving ? false : this.smartJumpStartEdge();
|
|
43934
|
+
const j1 = this.smartJumpEndEdge();
|
|
43935
|
+
const j2 = this.smartJumpStartEdge();
|
|
43899
43936
|
if (!j1 && !j2) {
|
|
43900
43937
|
this.updatePaths();
|
|
43901
43938
|
this.subject.publish(this);
|
|
@@ -44008,6 +44045,9 @@ class Connector2 extends BaseItem {
|
|
|
44008
44045
|
getSmartJump() {
|
|
44009
44046
|
return this.smartJump;
|
|
44010
44047
|
}
|
|
44048
|
+
setSmartJump(value) {
|
|
44049
|
+
this.emit(connectorOps.setSmartJump([this], value));
|
|
44050
|
+
}
|
|
44011
44051
|
clearObservedItems() {
|
|
44012
44052
|
const startPoint = this.getStartPoint();
|
|
44013
44053
|
const endPoint = this.getEndPoint();
|
|
@@ -44086,6 +44126,9 @@ class Connector2 extends BaseItem {
|
|
|
44086
44126
|
case "switchPointers":
|
|
44087
44127
|
this.applySwitchPointers();
|
|
44088
44128
|
break;
|
|
44129
|
+
case "setSmartJump":
|
|
44130
|
+
this.applySmartJump(operation.smartJump);
|
|
44131
|
+
break;
|
|
44089
44132
|
}
|
|
44090
44133
|
break;
|
|
44091
44134
|
default:
|
|
@@ -69962,6 +70005,7 @@ class AddConnector extends BoardTool {
|
|
|
69962
70005
|
lineColor;
|
|
69963
70006
|
lineWidth;
|
|
69964
70007
|
strokeStyle;
|
|
70008
|
+
smartJump = true;
|
|
69965
70009
|
snap;
|
|
69966
70010
|
isDraggingFromFirstToSecond = false;
|
|
69967
70011
|
isDoneSecondPoint = false;
|
|
@@ -69988,6 +70032,10 @@ class AddConnector extends BoardTool {
|
|
|
69988
70032
|
if (savedStyle) {
|
|
69989
70033
|
this.lineStyle = savedStyle;
|
|
69990
70034
|
}
|
|
70035
|
+
const savedSmartJump = storage.getConnectorSmartJump();
|
|
70036
|
+
if (savedSmartJump !== undefined) {
|
|
70037
|
+
this.smartJump = savedSmartJump;
|
|
70038
|
+
}
|
|
69991
70039
|
const savedStart = storage.getConnectorPointer("start");
|
|
69992
70040
|
if (savedStart) {
|
|
69993
70041
|
this.startPointer = savedStart;
|
|
@@ -70011,7 +70059,8 @@ class AddConnector extends BoardTool {
|
|
|
70011
70059
|
endPointer: this.endPointer,
|
|
70012
70060
|
lineColor: coerceOptionalColorValue(this.lineColor),
|
|
70013
70061
|
lineWidth: this.lineWidth,
|
|
70014
|
-
strokeStyle: this.strokeStyle
|
|
70062
|
+
strokeStyle: this.strokeStyle,
|
|
70063
|
+
smartJump: this.smartJump
|
|
70015
70064
|
});
|
|
70016
70065
|
}
|
|
70017
70066
|
}
|
|
@@ -70033,7 +70082,8 @@ class AddConnector extends BoardTool {
|
|
|
70033
70082
|
endPointer: this.endPointer,
|
|
70034
70083
|
lineColor: coerceOptionalColorValue(this.lineColor),
|
|
70035
70084
|
lineWidth: this.lineWidth,
|
|
70036
|
-
strokeStyle: this.strokeStyle
|
|
70085
|
+
strokeStyle: this.strokeStyle,
|
|
70086
|
+
smartJump: this.smartJump
|
|
70037
70087
|
});
|
|
70038
70088
|
} else {
|
|
70039
70089
|
this.connector.apply({
|
package/dist/cjs/node.js
CHANGED
|
@@ -8620,6 +8620,17 @@ class ConnectorCommand {
|
|
|
8620
8620
|
});
|
|
8621
8621
|
}
|
|
8622
8622
|
break;
|
|
8623
|
+
case "setSmartJump":
|
|
8624
|
+
for (const connector of this.connector) {
|
|
8625
|
+
reverse.push({
|
|
8626
|
+
item: connector,
|
|
8627
|
+
operation: {
|
|
8628
|
+
...this.operation,
|
|
8629
|
+
smartJump: connector.getSmartJump()
|
|
8630
|
+
}
|
|
8631
|
+
});
|
|
8632
|
+
}
|
|
8633
|
+
break;
|
|
8623
8634
|
}
|
|
8624
8635
|
return reverse;
|
|
8625
8636
|
}
|
|
@@ -28710,6 +28721,12 @@ class SessionStorage {
|
|
|
28710
28721
|
getConnectorLineStyle() {
|
|
28711
28722
|
return this.get("connectorLineStyle");
|
|
28712
28723
|
}
|
|
28724
|
+
setConnectorSmartJump(enabled) {
|
|
28725
|
+
this.set("connectorSmartJump", enabled);
|
|
28726
|
+
}
|
|
28727
|
+
getConnectorSmartJump() {
|
|
28728
|
+
return this.get("connectorSmartJump");
|
|
28729
|
+
}
|
|
28713
28730
|
setShapeData(data) {
|
|
28714
28731
|
this.set("lastShapeData", data);
|
|
28715
28732
|
}
|
|
@@ -46190,6 +46207,12 @@ var connectorOps = {
|
|
|
46190
46207
|
class: "Connector",
|
|
46191
46208
|
method: "switchPointers",
|
|
46192
46209
|
item: items.map((i) => i.getId())
|
|
46210
|
+
}),
|
|
46211
|
+
setSmartJump: (items, smartJump) => ({
|
|
46212
|
+
class: "Connector",
|
|
46213
|
+
method: "setSmartJump",
|
|
46214
|
+
item: items.map((i) => i.getId()),
|
|
46215
|
+
smartJump
|
|
46193
46216
|
})
|
|
46194
46217
|
};
|
|
46195
46218
|
|
|
@@ -46296,6 +46319,10 @@ class Connector2 extends BaseItem {
|
|
|
46296
46319
|
this.lineColor = semanticColor("contrastNeutral");
|
|
46297
46320
|
this.lineWidth = CONNECTOR_LINE_WIDTH;
|
|
46298
46321
|
this.borderStyle = CONNECTOR_BORDER_STYLE;
|
|
46322
|
+
const savedSmartJump = new SessionStorage().getConnectorSmartJump();
|
|
46323
|
+
if (savedSmartJump !== undefined) {
|
|
46324
|
+
this.smartJump = savedSmartJump;
|
|
46325
|
+
}
|
|
46299
46326
|
this.text = new RichText(this.board, this.id);
|
|
46300
46327
|
this.text.container = this.getMbr();
|
|
46301
46328
|
this.text.transformation = new Transformation;
|
|
@@ -46347,12 +46374,17 @@ class Connector2 extends BaseItem {
|
|
|
46347
46374
|
observerStartPointItem = () => {
|
|
46348
46375
|
const point3 = this.startPoint;
|
|
46349
46376
|
if (point3.pointType !== "Board") {
|
|
46377
|
+
if (Group.movingGroupId !== null) {
|
|
46378
|
+
point3.recalculatePoint();
|
|
46379
|
+
this.updatePaths();
|
|
46380
|
+
this.subject.publish(this);
|
|
46381
|
+
return;
|
|
46382
|
+
}
|
|
46350
46383
|
if (this.handleItemGeometryChange(point3, true))
|
|
46351
46384
|
return;
|
|
46352
46385
|
point3.recalculatePoint();
|
|
46353
|
-
const
|
|
46354
|
-
const
|
|
46355
|
-
const j2 = isGroupMoving ? false : this.smartJumpEndEdge();
|
|
46386
|
+
const j1 = this.smartJumpStartEdge();
|
|
46387
|
+
const j2 = this.smartJumpEndEdge();
|
|
46356
46388
|
if (!j1 && !j2) {
|
|
46357
46389
|
this.updatePaths();
|
|
46358
46390
|
this.subject.publish(this);
|
|
@@ -46362,12 +46394,17 @@ class Connector2 extends BaseItem {
|
|
|
46362
46394
|
observerEndPointItem = () => {
|
|
46363
46395
|
const point3 = this.endPoint;
|
|
46364
46396
|
if (point3.pointType !== "Board") {
|
|
46397
|
+
if (Group.movingGroupId !== null) {
|
|
46398
|
+
point3.recalculatePoint();
|
|
46399
|
+
this.updatePaths();
|
|
46400
|
+
this.subject.publish(this);
|
|
46401
|
+
return;
|
|
46402
|
+
}
|
|
46365
46403
|
if (this.handleItemGeometryChange(point3, false))
|
|
46366
46404
|
return;
|
|
46367
46405
|
point3.recalculatePoint();
|
|
46368
|
-
const
|
|
46369
|
-
const
|
|
46370
|
-
const j2 = isGroupMoving ? false : this.smartJumpStartEdge();
|
|
46406
|
+
const j1 = this.smartJumpEndEdge();
|
|
46407
|
+
const j2 = this.smartJumpStartEdge();
|
|
46371
46408
|
if (!j1 && !j2) {
|
|
46372
46409
|
this.updatePaths();
|
|
46373
46410
|
this.subject.publish(this);
|
|
@@ -46480,6 +46517,9 @@ class Connector2 extends BaseItem {
|
|
|
46480
46517
|
getSmartJump() {
|
|
46481
46518
|
return this.smartJump;
|
|
46482
46519
|
}
|
|
46520
|
+
setSmartJump(value) {
|
|
46521
|
+
this.emit(connectorOps.setSmartJump([this], value));
|
|
46522
|
+
}
|
|
46483
46523
|
clearObservedItems() {
|
|
46484
46524
|
const startPoint = this.getStartPoint();
|
|
46485
46525
|
const endPoint = this.getEndPoint();
|
|
@@ -46558,6 +46598,9 @@ class Connector2 extends BaseItem {
|
|
|
46558
46598
|
case "switchPointers":
|
|
46559
46599
|
this.applySwitchPointers();
|
|
46560
46600
|
break;
|
|
46601
|
+
case "setSmartJump":
|
|
46602
|
+
this.applySmartJump(operation.smartJump);
|
|
46603
|
+
break;
|
|
46561
46604
|
}
|
|
46562
46605
|
break;
|
|
46563
46606
|
default:
|
|
@@ -72435,6 +72478,7 @@ class AddConnector extends BoardTool {
|
|
|
72435
72478
|
lineColor;
|
|
72436
72479
|
lineWidth;
|
|
72437
72480
|
strokeStyle;
|
|
72481
|
+
smartJump = true;
|
|
72438
72482
|
snap;
|
|
72439
72483
|
isDraggingFromFirstToSecond = false;
|
|
72440
72484
|
isDoneSecondPoint = false;
|
|
@@ -72461,6 +72505,10 @@ class AddConnector extends BoardTool {
|
|
|
72461
72505
|
if (savedStyle) {
|
|
72462
72506
|
this.lineStyle = savedStyle;
|
|
72463
72507
|
}
|
|
72508
|
+
const savedSmartJump = storage.getConnectorSmartJump();
|
|
72509
|
+
if (savedSmartJump !== undefined) {
|
|
72510
|
+
this.smartJump = savedSmartJump;
|
|
72511
|
+
}
|
|
72464
72512
|
const savedStart = storage.getConnectorPointer("start");
|
|
72465
72513
|
if (savedStart) {
|
|
72466
72514
|
this.startPointer = savedStart;
|
|
@@ -72484,7 +72532,8 @@ class AddConnector extends BoardTool {
|
|
|
72484
72532
|
endPointer: this.endPointer,
|
|
72485
72533
|
lineColor: coerceOptionalColorValue(this.lineColor),
|
|
72486
72534
|
lineWidth: this.lineWidth,
|
|
72487
|
-
strokeStyle: this.strokeStyle
|
|
72535
|
+
strokeStyle: this.strokeStyle,
|
|
72536
|
+
smartJump: this.smartJump
|
|
72488
72537
|
});
|
|
72489
72538
|
}
|
|
72490
72539
|
}
|
|
@@ -72506,7 +72555,8 @@ class AddConnector extends BoardTool {
|
|
|
72506
72555
|
endPointer: this.endPointer,
|
|
72507
72556
|
lineColor: coerceOptionalColorValue(this.lineColor),
|
|
72508
72557
|
lineWidth: this.lineWidth,
|
|
72509
|
-
strokeStyle: this.strokeStyle
|
|
72558
|
+
strokeStyle: this.strokeStyle,
|
|
72559
|
+
smartJump: this.smartJump
|
|
72510
72560
|
});
|
|
72511
72561
|
} else {
|
|
72512
72562
|
this.connector.apply({
|
package/dist/esm/browser.js
CHANGED
|
@@ -7386,6 +7386,17 @@ class ConnectorCommand {
|
|
|
7386
7386
|
});
|
|
7387
7387
|
}
|
|
7388
7388
|
break;
|
|
7389
|
+
case "setSmartJump":
|
|
7390
|
+
for (const connector of this.connector) {
|
|
7391
|
+
reverse.push({
|
|
7392
|
+
item: connector,
|
|
7393
|
+
operation: {
|
|
7394
|
+
...this.operation,
|
|
7395
|
+
smartJump: connector.getSmartJump()
|
|
7396
|
+
}
|
|
7397
|
+
});
|
|
7398
|
+
}
|
|
7399
|
+
break;
|
|
7389
7400
|
}
|
|
7390
7401
|
return reverse;
|
|
7391
7402
|
}
|
|
@@ -27477,6 +27488,12 @@ class SessionStorage {
|
|
|
27477
27488
|
getConnectorLineStyle() {
|
|
27478
27489
|
return this.get("connectorLineStyle");
|
|
27479
27490
|
}
|
|
27491
|
+
setConnectorSmartJump(enabled) {
|
|
27492
|
+
this.set("connectorSmartJump", enabled);
|
|
27493
|
+
}
|
|
27494
|
+
getConnectorSmartJump() {
|
|
27495
|
+
return this.get("connectorSmartJump");
|
|
27496
|
+
}
|
|
27480
27497
|
setShapeData(data) {
|
|
27481
27498
|
this.set("lastShapeData", data);
|
|
27482
27499
|
}
|
|
@@ -43529,6 +43546,12 @@ var connectorOps = {
|
|
|
43529
43546
|
class: "Connector",
|
|
43530
43547
|
method: "switchPointers",
|
|
43531
43548
|
item: items.map((i) => i.getId())
|
|
43549
|
+
}),
|
|
43550
|
+
setSmartJump: (items, smartJump) => ({
|
|
43551
|
+
class: "Connector",
|
|
43552
|
+
method: "setSmartJump",
|
|
43553
|
+
item: items.map((i) => i.getId()),
|
|
43554
|
+
smartJump
|
|
43532
43555
|
})
|
|
43533
43556
|
};
|
|
43534
43557
|
|
|
@@ -43635,6 +43658,10 @@ class Connector2 extends BaseItem {
|
|
|
43635
43658
|
this.lineColor = semanticColor("contrastNeutral");
|
|
43636
43659
|
this.lineWidth = CONNECTOR_LINE_WIDTH;
|
|
43637
43660
|
this.borderStyle = CONNECTOR_BORDER_STYLE;
|
|
43661
|
+
const savedSmartJump = new SessionStorage().getConnectorSmartJump();
|
|
43662
|
+
if (savedSmartJump !== undefined) {
|
|
43663
|
+
this.smartJump = savedSmartJump;
|
|
43664
|
+
}
|
|
43638
43665
|
this.text = new RichText(this.board, this.id);
|
|
43639
43666
|
this.text.container = this.getMbr();
|
|
43640
43667
|
this.text.transformation = new Transformation;
|
|
@@ -43686,12 +43713,17 @@ class Connector2 extends BaseItem {
|
|
|
43686
43713
|
observerStartPointItem = () => {
|
|
43687
43714
|
const point3 = this.startPoint;
|
|
43688
43715
|
if (point3.pointType !== "Board") {
|
|
43716
|
+
if (Group.movingGroupId !== null) {
|
|
43717
|
+
point3.recalculatePoint();
|
|
43718
|
+
this.updatePaths();
|
|
43719
|
+
this.subject.publish(this);
|
|
43720
|
+
return;
|
|
43721
|
+
}
|
|
43689
43722
|
if (this.handleItemGeometryChange(point3, true))
|
|
43690
43723
|
return;
|
|
43691
43724
|
point3.recalculatePoint();
|
|
43692
|
-
const
|
|
43693
|
-
const
|
|
43694
|
-
const j2 = isGroupMoving ? false : this.smartJumpEndEdge();
|
|
43725
|
+
const j1 = this.smartJumpStartEdge();
|
|
43726
|
+
const j2 = this.smartJumpEndEdge();
|
|
43695
43727
|
if (!j1 && !j2) {
|
|
43696
43728
|
this.updatePaths();
|
|
43697
43729
|
this.subject.publish(this);
|
|
@@ -43701,12 +43733,17 @@ class Connector2 extends BaseItem {
|
|
|
43701
43733
|
observerEndPointItem = () => {
|
|
43702
43734
|
const point3 = this.endPoint;
|
|
43703
43735
|
if (point3.pointType !== "Board") {
|
|
43736
|
+
if (Group.movingGroupId !== null) {
|
|
43737
|
+
point3.recalculatePoint();
|
|
43738
|
+
this.updatePaths();
|
|
43739
|
+
this.subject.publish(this);
|
|
43740
|
+
return;
|
|
43741
|
+
}
|
|
43704
43742
|
if (this.handleItemGeometryChange(point3, false))
|
|
43705
43743
|
return;
|
|
43706
43744
|
point3.recalculatePoint();
|
|
43707
|
-
const
|
|
43708
|
-
const
|
|
43709
|
-
const j2 = isGroupMoving ? false : this.smartJumpStartEdge();
|
|
43745
|
+
const j1 = this.smartJumpEndEdge();
|
|
43746
|
+
const j2 = this.smartJumpStartEdge();
|
|
43710
43747
|
if (!j1 && !j2) {
|
|
43711
43748
|
this.updatePaths();
|
|
43712
43749
|
this.subject.publish(this);
|
|
@@ -43819,6 +43856,9 @@ class Connector2 extends BaseItem {
|
|
|
43819
43856
|
getSmartJump() {
|
|
43820
43857
|
return this.smartJump;
|
|
43821
43858
|
}
|
|
43859
|
+
setSmartJump(value) {
|
|
43860
|
+
this.emit(connectorOps.setSmartJump([this], value));
|
|
43861
|
+
}
|
|
43822
43862
|
clearObservedItems() {
|
|
43823
43863
|
const startPoint = this.getStartPoint();
|
|
43824
43864
|
const endPoint = this.getEndPoint();
|
|
@@ -43897,6 +43937,9 @@ class Connector2 extends BaseItem {
|
|
|
43897
43937
|
case "switchPointers":
|
|
43898
43938
|
this.applySwitchPointers();
|
|
43899
43939
|
break;
|
|
43940
|
+
case "setSmartJump":
|
|
43941
|
+
this.applySmartJump(operation.smartJump);
|
|
43942
|
+
break;
|
|
43900
43943
|
}
|
|
43901
43944
|
break;
|
|
43902
43945
|
default:
|
|
@@ -69773,6 +69816,7 @@ class AddConnector extends BoardTool {
|
|
|
69773
69816
|
lineColor;
|
|
69774
69817
|
lineWidth;
|
|
69775
69818
|
strokeStyle;
|
|
69819
|
+
smartJump = true;
|
|
69776
69820
|
snap;
|
|
69777
69821
|
isDraggingFromFirstToSecond = false;
|
|
69778
69822
|
isDoneSecondPoint = false;
|
|
@@ -69799,6 +69843,10 @@ class AddConnector extends BoardTool {
|
|
|
69799
69843
|
if (savedStyle) {
|
|
69800
69844
|
this.lineStyle = savedStyle;
|
|
69801
69845
|
}
|
|
69846
|
+
const savedSmartJump = storage.getConnectorSmartJump();
|
|
69847
|
+
if (savedSmartJump !== undefined) {
|
|
69848
|
+
this.smartJump = savedSmartJump;
|
|
69849
|
+
}
|
|
69802
69850
|
const savedStart = storage.getConnectorPointer("start");
|
|
69803
69851
|
if (savedStart) {
|
|
69804
69852
|
this.startPointer = savedStart;
|
|
@@ -69822,7 +69870,8 @@ class AddConnector extends BoardTool {
|
|
|
69822
69870
|
endPointer: this.endPointer,
|
|
69823
69871
|
lineColor: coerceOptionalColorValue(this.lineColor),
|
|
69824
69872
|
lineWidth: this.lineWidth,
|
|
69825
|
-
strokeStyle: this.strokeStyle
|
|
69873
|
+
strokeStyle: this.strokeStyle,
|
|
69874
|
+
smartJump: this.smartJump
|
|
69826
69875
|
});
|
|
69827
69876
|
}
|
|
69828
69877
|
}
|
|
@@ -69844,7 +69893,8 @@ class AddConnector extends BoardTool {
|
|
|
69844
69893
|
endPointer: this.endPointer,
|
|
69845
69894
|
lineColor: coerceOptionalColorValue(this.lineColor),
|
|
69846
69895
|
lineWidth: this.lineWidth,
|
|
69847
|
-
strokeStyle: this.strokeStyle
|
|
69896
|
+
strokeStyle: this.strokeStyle,
|
|
69897
|
+
smartJump: this.smartJump
|
|
69848
69898
|
});
|
|
69849
69899
|
} else {
|
|
69850
69900
|
this.connector.apply({
|
package/dist/esm/index.js
CHANGED
|
@@ -7379,6 +7379,17 @@ class ConnectorCommand {
|
|
|
7379
7379
|
});
|
|
7380
7380
|
}
|
|
7381
7381
|
break;
|
|
7382
|
+
case "setSmartJump":
|
|
7383
|
+
for (const connector of this.connector) {
|
|
7384
|
+
reverse.push({
|
|
7385
|
+
item: connector,
|
|
7386
|
+
operation: {
|
|
7387
|
+
...this.operation,
|
|
7388
|
+
smartJump: connector.getSmartJump()
|
|
7389
|
+
}
|
|
7390
|
+
});
|
|
7391
|
+
}
|
|
7392
|
+
break;
|
|
7382
7393
|
}
|
|
7383
7394
|
return reverse;
|
|
7384
7395
|
}
|
|
@@ -27470,6 +27481,12 @@ class SessionStorage {
|
|
|
27470
27481
|
getConnectorLineStyle() {
|
|
27471
27482
|
return this.get("connectorLineStyle");
|
|
27472
27483
|
}
|
|
27484
|
+
setConnectorSmartJump(enabled) {
|
|
27485
|
+
this.set("connectorSmartJump", enabled);
|
|
27486
|
+
}
|
|
27487
|
+
getConnectorSmartJump() {
|
|
27488
|
+
return this.get("connectorSmartJump");
|
|
27489
|
+
}
|
|
27473
27490
|
setShapeData(data) {
|
|
27474
27491
|
this.set("lastShapeData", data);
|
|
27475
27492
|
}
|
|
@@ -43522,6 +43539,12 @@ var connectorOps = {
|
|
|
43522
43539
|
class: "Connector",
|
|
43523
43540
|
method: "switchPointers",
|
|
43524
43541
|
item: items.map((i) => i.getId())
|
|
43542
|
+
}),
|
|
43543
|
+
setSmartJump: (items, smartJump) => ({
|
|
43544
|
+
class: "Connector",
|
|
43545
|
+
method: "setSmartJump",
|
|
43546
|
+
item: items.map((i) => i.getId()),
|
|
43547
|
+
smartJump
|
|
43525
43548
|
})
|
|
43526
43549
|
};
|
|
43527
43550
|
|
|
@@ -43628,6 +43651,10 @@ class Connector2 extends BaseItem {
|
|
|
43628
43651
|
this.lineColor = semanticColor("contrastNeutral");
|
|
43629
43652
|
this.lineWidth = CONNECTOR_LINE_WIDTH;
|
|
43630
43653
|
this.borderStyle = CONNECTOR_BORDER_STYLE;
|
|
43654
|
+
const savedSmartJump = new SessionStorage().getConnectorSmartJump();
|
|
43655
|
+
if (savedSmartJump !== undefined) {
|
|
43656
|
+
this.smartJump = savedSmartJump;
|
|
43657
|
+
}
|
|
43631
43658
|
this.text = new RichText(this.board, this.id);
|
|
43632
43659
|
this.text.container = this.getMbr();
|
|
43633
43660
|
this.text.transformation = new Transformation;
|
|
@@ -43679,12 +43706,17 @@ class Connector2 extends BaseItem {
|
|
|
43679
43706
|
observerStartPointItem = () => {
|
|
43680
43707
|
const point3 = this.startPoint;
|
|
43681
43708
|
if (point3.pointType !== "Board") {
|
|
43709
|
+
if (Group.movingGroupId !== null) {
|
|
43710
|
+
point3.recalculatePoint();
|
|
43711
|
+
this.updatePaths();
|
|
43712
|
+
this.subject.publish(this);
|
|
43713
|
+
return;
|
|
43714
|
+
}
|
|
43682
43715
|
if (this.handleItemGeometryChange(point3, true))
|
|
43683
43716
|
return;
|
|
43684
43717
|
point3.recalculatePoint();
|
|
43685
|
-
const
|
|
43686
|
-
const
|
|
43687
|
-
const j2 = isGroupMoving ? false : this.smartJumpEndEdge();
|
|
43718
|
+
const j1 = this.smartJumpStartEdge();
|
|
43719
|
+
const j2 = this.smartJumpEndEdge();
|
|
43688
43720
|
if (!j1 && !j2) {
|
|
43689
43721
|
this.updatePaths();
|
|
43690
43722
|
this.subject.publish(this);
|
|
@@ -43694,12 +43726,17 @@ class Connector2 extends BaseItem {
|
|
|
43694
43726
|
observerEndPointItem = () => {
|
|
43695
43727
|
const point3 = this.endPoint;
|
|
43696
43728
|
if (point3.pointType !== "Board") {
|
|
43729
|
+
if (Group.movingGroupId !== null) {
|
|
43730
|
+
point3.recalculatePoint();
|
|
43731
|
+
this.updatePaths();
|
|
43732
|
+
this.subject.publish(this);
|
|
43733
|
+
return;
|
|
43734
|
+
}
|
|
43697
43735
|
if (this.handleItemGeometryChange(point3, false))
|
|
43698
43736
|
return;
|
|
43699
43737
|
point3.recalculatePoint();
|
|
43700
|
-
const
|
|
43701
|
-
const
|
|
43702
|
-
const j2 = isGroupMoving ? false : this.smartJumpStartEdge();
|
|
43738
|
+
const j1 = this.smartJumpEndEdge();
|
|
43739
|
+
const j2 = this.smartJumpStartEdge();
|
|
43703
43740
|
if (!j1 && !j2) {
|
|
43704
43741
|
this.updatePaths();
|
|
43705
43742
|
this.subject.publish(this);
|
|
@@ -43812,6 +43849,9 @@ class Connector2 extends BaseItem {
|
|
|
43812
43849
|
getSmartJump() {
|
|
43813
43850
|
return this.smartJump;
|
|
43814
43851
|
}
|
|
43852
|
+
setSmartJump(value) {
|
|
43853
|
+
this.emit(connectorOps.setSmartJump([this], value));
|
|
43854
|
+
}
|
|
43815
43855
|
clearObservedItems() {
|
|
43816
43856
|
const startPoint = this.getStartPoint();
|
|
43817
43857
|
const endPoint = this.getEndPoint();
|
|
@@ -43890,6 +43930,9 @@ class Connector2 extends BaseItem {
|
|
|
43890
43930
|
case "switchPointers":
|
|
43891
43931
|
this.applySwitchPointers();
|
|
43892
43932
|
break;
|
|
43933
|
+
case "setSmartJump":
|
|
43934
|
+
this.applySmartJump(operation.smartJump);
|
|
43935
|
+
break;
|
|
43893
43936
|
}
|
|
43894
43937
|
break;
|
|
43895
43938
|
default:
|
|
@@ -69766,6 +69809,7 @@ class AddConnector extends BoardTool {
|
|
|
69766
69809
|
lineColor;
|
|
69767
69810
|
lineWidth;
|
|
69768
69811
|
strokeStyle;
|
|
69812
|
+
smartJump = true;
|
|
69769
69813
|
snap;
|
|
69770
69814
|
isDraggingFromFirstToSecond = false;
|
|
69771
69815
|
isDoneSecondPoint = false;
|
|
@@ -69792,6 +69836,10 @@ class AddConnector extends BoardTool {
|
|
|
69792
69836
|
if (savedStyle) {
|
|
69793
69837
|
this.lineStyle = savedStyle;
|
|
69794
69838
|
}
|
|
69839
|
+
const savedSmartJump = storage.getConnectorSmartJump();
|
|
69840
|
+
if (savedSmartJump !== undefined) {
|
|
69841
|
+
this.smartJump = savedSmartJump;
|
|
69842
|
+
}
|
|
69795
69843
|
const savedStart = storage.getConnectorPointer("start");
|
|
69796
69844
|
if (savedStart) {
|
|
69797
69845
|
this.startPointer = savedStart;
|
|
@@ -69815,7 +69863,8 @@ class AddConnector extends BoardTool {
|
|
|
69815
69863
|
endPointer: this.endPointer,
|
|
69816
69864
|
lineColor: coerceOptionalColorValue(this.lineColor),
|
|
69817
69865
|
lineWidth: this.lineWidth,
|
|
69818
|
-
strokeStyle: this.strokeStyle
|
|
69866
|
+
strokeStyle: this.strokeStyle,
|
|
69867
|
+
smartJump: this.smartJump
|
|
69819
69868
|
});
|
|
69820
69869
|
}
|
|
69821
69870
|
}
|
|
@@ -69837,7 +69886,8 @@ class AddConnector extends BoardTool {
|
|
|
69837
69886
|
endPointer: this.endPointer,
|
|
69838
69887
|
lineColor: coerceOptionalColorValue(this.lineColor),
|
|
69839
69888
|
lineWidth: this.lineWidth,
|
|
69840
|
-
strokeStyle: this.strokeStyle
|
|
69889
|
+
strokeStyle: this.strokeStyle,
|
|
69890
|
+
smartJump: this.smartJump
|
|
69841
69891
|
});
|
|
69842
69892
|
} else {
|
|
69843
69893
|
this.connector.apply({
|
package/dist/esm/node.js
CHANGED
|
@@ -8163,6 +8163,17 @@ class ConnectorCommand {
|
|
|
8163
8163
|
});
|
|
8164
8164
|
}
|
|
8165
8165
|
break;
|
|
8166
|
+
case "setSmartJump":
|
|
8167
|
+
for (const connector of this.connector) {
|
|
8168
|
+
reverse.push({
|
|
8169
|
+
item: connector,
|
|
8170
|
+
operation: {
|
|
8171
|
+
...this.operation,
|
|
8172
|
+
smartJump: connector.getSmartJump()
|
|
8173
|
+
}
|
|
8174
|
+
});
|
|
8175
|
+
}
|
|
8176
|
+
break;
|
|
8166
8177
|
}
|
|
8167
8178
|
return reverse;
|
|
8168
8179
|
}
|
|
@@ -28253,6 +28264,12 @@ class SessionStorage {
|
|
|
28253
28264
|
getConnectorLineStyle() {
|
|
28254
28265
|
return this.get("connectorLineStyle");
|
|
28255
28266
|
}
|
|
28267
|
+
setConnectorSmartJump(enabled) {
|
|
28268
|
+
this.set("connectorSmartJump", enabled);
|
|
28269
|
+
}
|
|
28270
|
+
getConnectorSmartJump() {
|
|
28271
|
+
return this.get("connectorSmartJump");
|
|
28272
|
+
}
|
|
28256
28273
|
setShapeData(data) {
|
|
28257
28274
|
this.set("lastShapeData", data);
|
|
28258
28275
|
}
|
|
@@ -45989,6 +46006,12 @@ var connectorOps = {
|
|
|
45989
46006
|
class: "Connector",
|
|
45990
46007
|
method: "switchPointers",
|
|
45991
46008
|
item: items.map((i) => i.getId())
|
|
46009
|
+
}),
|
|
46010
|
+
setSmartJump: (items, smartJump) => ({
|
|
46011
|
+
class: "Connector",
|
|
46012
|
+
method: "setSmartJump",
|
|
46013
|
+
item: items.map((i) => i.getId()),
|
|
46014
|
+
smartJump
|
|
45992
46015
|
})
|
|
45993
46016
|
};
|
|
45994
46017
|
|
|
@@ -46095,6 +46118,10 @@ class Connector2 extends BaseItem {
|
|
|
46095
46118
|
this.lineColor = semanticColor("contrastNeutral");
|
|
46096
46119
|
this.lineWidth = CONNECTOR_LINE_WIDTH;
|
|
46097
46120
|
this.borderStyle = CONNECTOR_BORDER_STYLE;
|
|
46121
|
+
const savedSmartJump = new SessionStorage().getConnectorSmartJump();
|
|
46122
|
+
if (savedSmartJump !== undefined) {
|
|
46123
|
+
this.smartJump = savedSmartJump;
|
|
46124
|
+
}
|
|
46098
46125
|
this.text = new RichText(this.board, this.id);
|
|
46099
46126
|
this.text.container = this.getMbr();
|
|
46100
46127
|
this.text.transformation = new Transformation;
|
|
@@ -46146,12 +46173,17 @@ class Connector2 extends BaseItem {
|
|
|
46146
46173
|
observerStartPointItem = () => {
|
|
46147
46174
|
const point3 = this.startPoint;
|
|
46148
46175
|
if (point3.pointType !== "Board") {
|
|
46176
|
+
if (Group.movingGroupId !== null) {
|
|
46177
|
+
point3.recalculatePoint();
|
|
46178
|
+
this.updatePaths();
|
|
46179
|
+
this.subject.publish(this);
|
|
46180
|
+
return;
|
|
46181
|
+
}
|
|
46149
46182
|
if (this.handleItemGeometryChange(point3, true))
|
|
46150
46183
|
return;
|
|
46151
46184
|
point3.recalculatePoint();
|
|
46152
|
-
const
|
|
46153
|
-
const
|
|
46154
|
-
const j2 = isGroupMoving ? false : this.smartJumpEndEdge();
|
|
46185
|
+
const j1 = this.smartJumpStartEdge();
|
|
46186
|
+
const j2 = this.smartJumpEndEdge();
|
|
46155
46187
|
if (!j1 && !j2) {
|
|
46156
46188
|
this.updatePaths();
|
|
46157
46189
|
this.subject.publish(this);
|
|
@@ -46161,12 +46193,17 @@ class Connector2 extends BaseItem {
|
|
|
46161
46193
|
observerEndPointItem = () => {
|
|
46162
46194
|
const point3 = this.endPoint;
|
|
46163
46195
|
if (point3.pointType !== "Board") {
|
|
46196
|
+
if (Group.movingGroupId !== null) {
|
|
46197
|
+
point3.recalculatePoint();
|
|
46198
|
+
this.updatePaths();
|
|
46199
|
+
this.subject.publish(this);
|
|
46200
|
+
return;
|
|
46201
|
+
}
|
|
46164
46202
|
if (this.handleItemGeometryChange(point3, false))
|
|
46165
46203
|
return;
|
|
46166
46204
|
point3.recalculatePoint();
|
|
46167
|
-
const
|
|
46168
|
-
const
|
|
46169
|
-
const j2 = isGroupMoving ? false : this.smartJumpStartEdge();
|
|
46205
|
+
const j1 = this.smartJumpEndEdge();
|
|
46206
|
+
const j2 = this.smartJumpStartEdge();
|
|
46170
46207
|
if (!j1 && !j2) {
|
|
46171
46208
|
this.updatePaths();
|
|
46172
46209
|
this.subject.publish(this);
|
|
@@ -46279,6 +46316,9 @@ class Connector2 extends BaseItem {
|
|
|
46279
46316
|
getSmartJump() {
|
|
46280
46317
|
return this.smartJump;
|
|
46281
46318
|
}
|
|
46319
|
+
setSmartJump(value) {
|
|
46320
|
+
this.emit(connectorOps.setSmartJump([this], value));
|
|
46321
|
+
}
|
|
46282
46322
|
clearObservedItems() {
|
|
46283
46323
|
const startPoint = this.getStartPoint();
|
|
46284
46324
|
const endPoint = this.getEndPoint();
|
|
@@ -46357,6 +46397,9 @@ class Connector2 extends BaseItem {
|
|
|
46357
46397
|
case "switchPointers":
|
|
46358
46398
|
this.applySwitchPointers();
|
|
46359
46399
|
break;
|
|
46400
|
+
case "setSmartJump":
|
|
46401
|
+
this.applySmartJump(operation.smartJump);
|
|
46402
|
+
break;
|
|
46360
46403
|
}
|
|
46361
46404
|
break;
|
|
46362
46405
|
default:
|
|
@@ -72234,6 +72277,7 @@ class AddConnector extends BoardTool {
|
|
|
72234
72277
|
lineColor;
|
|
72235
72278
|
lineWidth;
|
|
72236
72279
|
strokeStyle;
|
|
72280
|
+
smartJump = true;
|
|
72237
72281
|
snap;
|
|
72238
72282
|
isDraggingFromFirstToSecond = false;
|
|
72239
72283
|
isDoneSecondPoint = false;
|
|
@@ -72260,6 +72304,10 @@ class AddConnector extends BoardTool {
|
|
|
72260
72304
|
if (savedStyle) {
|
|
72261
72305
|
this.lineStyle = savedStyle;
|
|
72262
72306
|
}
|
|
72307
|
+
const savedSmartJump = storage.getConnectorSmartJump();
|
|
72308
|
+
if (savedSmartJump !== undefined) {
|
|
72309
|
+
this.smartJump = savedSmartJump;
|
|
72310
|
+
}
|
|
72263
72311
|
const savedStart = storage.getConnectorPointer("start");
|
|
72264
72312
|
if (savedStart) {
|
|
72265
72313
|
this.startPointer = savedStart;
|
|
@@ -72283,7 +72331,8 @@ class AddConnector extends BoardTool {
|
|
|
72283
72331
|
endPointer: this.endPointer,
|
|
72284
72332
|
lineColor: coerceOptionalColorValue(this.lineColor),
|
|
72285
72333
|
lineWidth: this.lineWidth,
|
|
72286
|
-
strokeStyle: this.strokeStyle
|
|
72334
|
+
strokeStyle: this.strokeStyle,
|
|
72335
|
+
smartJump: this.smartJump
|
|
72287
72336
|
});
|
|
72288
72337
|
}
|
|
72289
72338
|
}
|
|
@@ -72305,7 +72354,8 @@ class AddConnector extends BoardTool {
|
|
|
72305
72354
|
endPointer: this.endPointer,
|
|
72306
72355
|
lineColor: coerceOptionalColorValue(this.lineColor),
|
|
72307
72356
|
lineWidth: this.lineWidth,
|
|
72308
|
-
strokeStyle: this.strokeStyle
|
|
72357
|
+
strokeStyle: this.strokeStyle,
|
|
72358
|
+
smartJump: this.smartJump
|
|
72309
72359
|
});
|
|
72310
72360
|
} else {
|
|
72311
72361
|
this.connector.apply({
|
|
@@ -58,6 +58,7 @@ export declare class Connector extends BaseItem<Connector> {
|
|
|
58
58
|
private smartJumpEndEdge;
|
|
59
59
|
private applySmartJump;
|
|
60
60
|
getSmartJump(): boolean;
|
|
61
|
+
setSmartJump(value: boolean): void;
|
|
61
62
|
clearObservedItems(): void;
|
|
62
63
|
private unsubscribeFromItem;
|
|
63
64
|
private subscribeToItem;
|
|
@@ -6,4 +6,5 @@ export declare const connectorOps: {
|
|
|
6
6
|
setEndPoint: (items: Connector[], point: ControlPoint | ControlPointData, timestamp?: number) => ConnectorOperation;
|
|
7
7
|
setMiddlePoint: (items: Connector[], point: ControlPoint | ControlPointData | null, timestamp?: number) => ConnectorOperation;
|
|
8
8
|
switchPointers: (items: Connector[]) => ConnectorOperation;
|
|
9
|
+
setSmartJump: (items: Connector[], smartJump: boolean) => ConnectorOperation;
|
|
9
10
|
};
|
|
@@ -20,6 +20,8 @@ export declare class SessionStorage {
|
|
|
20
20
|
getConnectorPointer(edge: ConnectorEdge): ConnectorPointerStyle | undefined;
|
|
21
21
|
setConnectorLineStyle(type: ConnectorLineStyle): void;
|
|
22
22
|
getConnectorLineStyle(): ConnectorLineStyle | undefined;
|
|
23
|
+
setConnectorSmartJump(enabled: boolean): void;
|
|
24
|
+
getConnectorSmartJump(): boolean | undefined;
|
|
23
25
|
setShapeData(data: Partial<ShapeData>): void;
|
|
24
26
|
getShapeData(): ShapeData | undefined;
|
|
25
27
|
setStickerData(data: Partial<StickerData>): void;
|