microboard-temp 0.14.12 → 0.14.13

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.
@@ -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;
@@ -44008,6 +44035,9 @@ class Connector2 extends BaseItem {
44008
44035
  getSmartJump() {
44009
44036
  return this.smartJump;
44010
44037
  }
44038
+ setSmartJump(value) {
44039
+ this.emit(connectorOps.setSmartJump([this], value));
44040
+ }
44011
44041
  clearObservedItems() {
44012
44042
  const startPoint = this.getStartPoint();
44013
44043
  const endPoint = this.getEndPoint();
@@ -44086,6 +44116,9 @@ class Connector2 extends BaseItem {
44086
44116
  case "switchPointers":
44087
44117
  this.applySwitchPointers();
44088
44118
  break;
44119
+ case "setSmartJump":
44120
+ this.applySmartJump(operation.smartJump);
44121
+ break;
44089
44122
  }
44090
44123
  break;
44091
44124
  default:
@@ -69962,6 +69995,7 @@ class AddConnector extends BoardTool {
69962
69995
  lineColor;
69963
69996
  lineWidth;
69964
69997
  strokeStyle;
69998
+ smartJump = true;
69965
69999
  snap;
69966
70000
  isDraggingFromFirstToSecond = false;
69967
70001
  isDoneSecondPoint = false;
@@ -69988,6 +70022,10 @@ class AddConnector extends BoardTool {
69988
70022
  if (savedStyle) {
69989
70023
  this.lineStyle = savedStyle;
69990
70024
  }
70025
+ const savedSmartJump = storage.getConnectorSmartJump();
70026
+ if (savedSmartJump !== undefined) {
70027
+ this.smartJump = savedSmartJump;
70028
+ }
69991
70029
  const savedStart = storage.getConnectorPointer("start");
69992
70030
  if (savedStart) {
69993
70031
  this.startPointer = savedStart;
@@ -70011,7 +70049,8 @@ class AddConnector extends BoardTool {
70011
70049
  endPointer: this.endPointer,
70012
70050
  lineColor: coerceOptionalColorValue(this.lineColor),
70013
70051
  lineWidth: this.lineWidth,
70014
- strokeStyle: this.strokeStyle
70052
+ strokeStyle: this.strokeStyle,
70053
+ smartJump: this.smartJump
70015
70054
  });
70016
70055
  }
70017
70056
  }
@@ -70033,7 +70072,8 @@ class AddConnector extends BoardTool {
70033
70072
  endPointer: this.endPointer,
70034
70073
  lineColor: coerceOptionalColorValue(this.lineColor),
70035
70074
  lineWidth: this.lineWidth,
70036
- strokeStyle: this.strokeStyle
70075
+ strokeStyle: this.strokeStyle,
70076
+ smartJump: this.smartJump
70037
70077
  });
70038
70078
  } else {
70039
70079
  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;
@@ -44008,6 +44035,9 @@ class Connector2 extends BaseItem {
44008
44035
  getSmartJump() {
44009
44036
  return this.smartJump;
44010
44037
  }
44038
+ setSmartJump(value) {
44039
+ this.emit(connectorOps.setSmartJump([this], value));
44040
+ }
44011
44041
  clearObservedItems() {
44012
44042
  const startPoint = this.getStartPoint();
44013
44043
  const endPoint = this.getEndPoint();
@@ -44086,6 +44116,9 @@ class Connector2 extends BaseItem {
44086
44116
  case "switchPointers":
44087
44117
  this.applySwitchPointers();
44088
44118
  break;
44119
+ case "setSmartJump":
44120
+ this.applySmartJump(operation.smartJump);
44121
+ break;
44089
44122
  }
44090
44123
  break;
44091
44124
  default:
@@ -69962,6 +69995,7 @@ class AddConnector extends BoardTool {
69962
69995
  lineColor;
69963
69996
  lineWidth;
69964
69997
  strokeStyle;
69998
+ smartJump = true;
69965
69999
  snap;
69966
70000
  isDraggingFromFirstToSecond = false;
69967
70001
  isDoneSecondPoint = false;
@@ -69988,6 +70022,10 @@ class AddConnector extends BoardTool {
69988
70022
  if (savedStyle) {
69989
70023
  this.lineStyle = savedStyle;
69990
70024
  }
70025
+ const savedSmartJump = storage.getConnectorSmartJump();
70026
+ if (savedSmartJump !== undefined) {
70027
+ this.smartJump = savedSmartJump;
70028
+ }
69991
70029
  const savedStart = storage.getConnectorPointer("start");
69992
70030
  if (savedStart) {
69993
70031
  this.startPointer = savedStart;
@@ -70011,7 +70049,8 @@ class AddConnector extends BoardTool {
70011
70049
  endPointer: this.endPointer,
70012
70050
  lineColor: coerceOptionalColorValue(this.lineColor),
70013
70051
  lineWidth: this.lineWidth,
70014
- strokeStyle: this.strokeStyle
70052
+ strokeStyle: this.strokeStyle,
70053
+ smartJump: this.smartJump
70015
70054
  });
70016
70055
  }
70017
70056
  }
@@ -70033,7 +70072,8 @@ class AddConnector extends BoardTool {
70033
70072
  endPointer: this.endPointer,
70034
70073
  lineColor: coerceOptionalColorValue(this.lineColor),
70035
70074
  lineWidth: this.lineWidth,
70036
- strokeStyle: this.strokeStyle
70075
+ strokeStyle: this.strokeStyle,
70076
+ smartJump: this.smartJump
70037
70077
  });
70038
70078
  } else {
70039
70079
  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;
@@ -46480,6 +46507,9 @@ class Connector2 extends BaseItem {
46480
46507
  getSmartJump() {
46481
46508
  return this.smartJump;
46482
46509
  }
46510
+ setSmartJump(value) {
46511
+ this.emit(connectorOps.setSmartJump([this], value));
46512
+ }
46483
46513
  clearObservedItems() {
46484
46514
  const startPoint = this.getStartPoint();
46485
46515
  const endPoint = this.getEndPoint();
@@ -46558,6 +46588,9 @@ class Connector2 extends BaseItem {
46558
46588
  case "switchPointers":
46559
46589
  this.applySwitchPointers();
46560
46590
  break;
46591
+ case "setSmartJump":
46592
+ this.applySmartJump(operation.smartJump);
46593
+ break;
46561
46594
  }
46562
46595
  break;
46563
46596
  default:
@@ -72435,6 +72468,7 @@ class AddConnector extends BoardTool {
72435
72468
  lineColor;
72436
72469
  lineWidth;
72437
72470
  strokeStyle;
72471
+ smartJump = true;
72438
72472
  snap;
72439
72473
  isDraggingFromFirstToSecond = false;
72440
72474
  isDoneSecondPoint = false;
@@ -72461,6 +72495,10 @@ class AddConnector extends BoardTool {
72461
72495
  if (savedStyle) {
72462
72496
  this.lineStyle = savedStyle;
72463
72497
  }
72498
+ const savedSmartJump = storage.getConnectorSmartJump();
72499
+ if (savedSmartJump !== undefined) {
72500
+ this.smartJump = savedSmartJump;
72501
+ }
72464
72502
  const savedStart = storage.getConnectorPointer("start");
72465
72503
  if (savedStart) {
72466
72504
  this.startPointer = savedStart;
@@ -72484,7 +72522,8 @@ class AddConnector extends BoardTool {
72484
72522
  endPointer: this.endPointer,
72485
72523
  lineColor: coerceOptionalColorValue(this.lineColor),
72486
72524
  lineWidth: this.lineWidth,
72487
- strokeStyle: this.strokeStyle
72525
+ strokeStyle: this.strokeStyle,
72526
+ smartJump: this.smartJump
72488
72527
  });
72489
72528
  }
72490
72529
  }
@@ -72506,7 +72545,8 @@ class AddConnector extends BoardTool {
72506
72545
  endPointer: this.endPointer,
72507
72546
  lineColor: coerceOptionalColorValue(this.lineColor),
72508
72547
  lineWidth: this.lineWidth,
72509
- strokeStyle: this.strokeStyle
72548
+ strokeStyle: this.strokeStyle,
72549
+ smartJump: this.smartJump
72510
72550
  });
72511
72551
  } else {
72512
72552
  this.connector.apply({
@@ -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;
@@ -43819,6 +43846,9 @@ class Connector2 extends BaseItem {
43819
43846
  getSmartJump() {
43820
43847
  return this.smartJump;
43821
43848
  }
43849
+ setSmartJump(value) {
43850
+ this.emit(connectorOps.setSmartJump([this], value));
43851
+ }
43822
43852
  clearObservedItems() {
43823
43853
  const startPoint = this.getStartPoint();
43824
43854
  const endPoint = this.getEndPoint();
@@ -43897,6 +43927,9 @@ class Connector2 extends BaseItem {
43897
43927
  case "switchPointers":
43898
43928
  this.applySwitchPointers();
43899
43929
  break;
43930
+ case "setSmartJump":
43931
+ this.applySmartJump(operation.smartJump);
43932
+ break;
43900
43933
  }
43901
43934
  break;
43902
43935
  default:
@@ -69773,6 +69806,7 @@ class AddConnector extends BoardTool {
69773
69806
  lineColor;
69774
69807
  lineWidth;
69775
69808
  strokeStyle;
69809
+ smartJump = true;
69776
69810
  snap;
69777
69811
  isDraggingFromFirstToSecond = false;
69778
69812
  isDoneSecondPoint = false;
@@ -69799,6 +69833,10 @@ class AddConnector extends BoardTool {
69799
69833
  if (savedStyle) {
69800
69834
  this.lineStyle = savedStyle;
69801
69835
  }
69836
+ const savedSmartJump = storage.getConnectorSmartJump();
69837
+ if (savedSmartJump !== undefined) {
69838
+ this.smartJump = savedSmartJump;
69839
+ }
69802
69840
  const savedStart = storage.getConnectorPointer("start");
69803
69841
  if (savedStart) {
69804
69842
  this.startPointer = savedStart;
@@ -69822,7 +69860,8 @@ class AddConnector extends BoardTool {
69822
69860
  endPointer: this.endPointer,
69823
69861
  lineColor: coerceOptionalColorValue(this.lineColor),
69824
69862
  lineWidth: this.lineWidth,
69825
- strokeStyle: this.strokeStyle
69863
+ strokeStyle: this.strokeStyle,
69864
+ smartJump: this.smartJump
69826
69865
  });
69827
69866
  }
69828
69867
  }
@@ -69844,7 +69883,8 @@ class AddConnector extends BoardTool {
69844
69883
  endPointer: this.endPointer,
69845
69884
  lineColor: coerceOptionalColorValue(this.lineColor),
69846
69885
  lineWidth: this.lineWidth,
69847
- strokeStyle: this.strokeStyle
69886
+ strokeStyle: this.strokeStyle,
69887
+ smartJump: this.smartJump
69848
69888
  });
69849
69889
  } else {
69850
69890
  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;
@@ -43812,6 +43839,9 @@ class Connector2 extends BaseItem {
43812
43839
  getSmartJump() {
43813
43840
  return this.smartJump;
43814
43841
  }
43842
+ setSmartJump(value) {
43843
+ this.emit(connectorOps.setSmartJump([this], value));
43844
+ }
43815
43845
  clearObservedItems() {
43816
43846
  const startPoint = this.getStartPoint();
43817
43847
  const endPoint = this.getEndPoint();
@@ -43890,6 +43920,9 @@ class Connector2 extends BaseItem {
43890
43920
  case "switchPointers":
43891
43921
  this.applySwitchPointers();
43892
43922
  break;
43923
+ case "setSmartJump":
43924
+ this.applySmartJump(operation.smartJump);
43925
+ break;
43893
43926
  }
43894
43927
  break;
43895
43928
  default:
@@ -69766,6 +69799,7 @@ class AddConnector extends BoardTool {
69766
69799
  lineColor;
69767
69800
  lineWidth;
69768
69801
  strokeStyle;
69802
+ smartJump = true;
69769
69803
  snap;
69770
69804
  isDraggingFromFirstToSecond = false;
69771
69805
  isDoneSecondPoint = false;
@@ -69792,6 +69826,10 @@ class AddConnector extends BoardTool {
69792
69826
  if (savedStyle) {
69793
69827
  this.lineStyle = savedStyle;
69794
69828
  }
69829
+ const savedSmartJump = storage.getConnectorSmartJump();
69830
+ if (savedSmartJump !== undefined) {
69831
+ this.smartJump = savedSmartJump;
69832
+ }
69795
69833
  const savedStart = storage.getConnectorPointer("start");
69796
69834
  if (savedStart) {
69797
69835
  this.startPointer = savedStart;
@@ -69815,7 +69853,8 @@ class AddConnector extends BoardTool {
69815
69853
  endPointer: this.endPointer,
69816
69854
  lineColor: coerceOptionalColorValue(this.lineColor),
69817
69855
  lineWidth: this.lineWidth,
69818
- strokeStyle: this.strokeStyle
69856
+ strokeStyle: this.strokeStyle,
69857
+ smartJump: this.smartJump
69819
69858
  });
69820
69859
  }
69821
69860
  }
@@ -69837,7 +69876,8 @@ class AddConnector extends BoardTool {
69837
69876
  endPointer: this.endPointer,
69838
69877
  lineColor: coerceOptionalColorValue(this.lineColor),
69839
69878
  lineWidth: this.lineWidth,
69840
- strokeStyle: this.strokeStyle
69879
+ strokeStyle: this.strokeStyle,
69880
+ smartJump: this.smartJump
69841
69881
  });
69842
69882
  } else {
69843
69883
  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;
@@ -46279,6 +46306,9 @@ class Connector2 extends BaseItem {
46279
46306
  getSmartJump() {
46280
46307
  return this.smartJump;
46281
46308
  }
46309
+ setSmartJump(value) {
46310
+ this.emit(connectorOps.setSmartJump([this], value));
46311
+ }
46282
46312
  clearObservedItems() {
46283
46313
  const startPoint = this.getStartPoint();
46284
46314
  const endPoint = this.getEndPoint();
@@ -46357,6 +46387,9 @@ class Connector2 extends BaseItem {
46357
46387
  case "switchPointers":
46358
46388
  this.applySwitchPointers();
46359
46389
  break;
46390
+ case "setSmartJump":
46391
+ this.applySmartJump(operation.smartJump);
46392
+ break;
46360
46393
  }
46361
46394
  break;
46362
46395
  default:
@@ -72234,6 +72267,7 @@ class AddConnector extends BoardTool {
72234
72267
  lineColor;
72235
72268
  lineWidth;
72236
72269
  strokeStyle;
72270
+ smartJump = true;
72237
72271
  snap;
72238
72272
  isDraggingFromFirstToSecond = false;
72239
72273
  isDoneSecondPoint = false;
@@ -72260,6 +72294,10 @@ class AddConnector extends BoardTool {
72260
72294
  if (savedStyle) {
72261
72295
  this.lineStyle = savedStyle;
72262
72296
  }
72297
+ const savedSmartJump = storage.getConnectorSmartJump();
72298
+ if (savedSmartJump !== undefined) {
72299
+ this.smartJump = savedSmartJump;
72300
+ }
72263
72301
  const savedStart = storage.getConnectorPointer("start");
72264
72302
  if (savedStart) {
72265
72303
  this.startPointer = savedStart;
@@ -72283,7 +72321,8 @@ class AddConnector extends BoardTool {
72283
72321
  endPointer: this.endPointer,
72284
72322
  lineColor: coerceOptionalColorValue(this.lineColor),
72285
72323
  lineWidth: this.lineWidth,
72286
- strokeStyle: this.strokeStyle
72324
+ strokeStyle: this.strokeStyle,
72325
+ smartJump: this.smartJump
72287
72326
  });
72288
72327
  }
72289
72328
  }
@@ -72305,7 +72344,8 @@ class AddConnector extends BoardTool {
72305
72344
  endPointer: this.endPointer,
72306
72345
  lineColor: coerceOptionalColorValue(this.lineColor),
72307
72346
  lineWidth: this.lineWidth,
72308
- strokeStyle: this.strokeStyle
72347
+ strokeStyle: this.strokeStyle,
72348
+ smartJump: this.smartJump
72309
72349
  });
72310
72350
  } else {
72311
72351
  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;
@@ -15,6 +15,7 @@ export declare class AddConnector extends BoardTool {
15
15
  lineColor?: string;
16
16
  lineWidth?: ConnectionLineWidth;
17
17
  strokeStyle?: BorderStyle;
18
+ smartJump: boolean;
18
19
  snap: ConnectorSnap;
19
20
  isDraggingFromFirstToSecond: boolean;
20
21
  isDoneSecondPoint: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.14.12",
3
+ "version": "0.14.13",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",