microboard-temp 0.14.0 → 0.14.2

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.
@@ -58309,6 +58309,7 @@ var init_Connector = __esm(() => {
58309
58309
  animationFrameId;
58310
58310
  text;
58311
58311
  transformationRenderBlock = undefined;
58312
+ _updatingTitle = false;
58312
58313
  optionalFindItemFn;
58313
58314
  constructor(board, startPoint = new BoardPoint, endPoint = new BoardPoint, lineStyle = "straight", startPointerStyle = "None", endPointerStyle = DEFAULT_END_POINTER, lineColor, lineWidth, strokeStyle, id = "") {
58314
58315
  super(board, id);
@@ -58892,6 +58893,9 @@ var init_Connector = __esm(() => {
58892
58893
  return items.find((item) => item instanceof Connector2 && item.getId() === connectorId);
58893
58894
  }
58894
58895
  updateTitle() {
58896
+ if (this._updatingTitle) {
58897
+ return;
58898
+ }
58895
58899
  const selection = this.board.selection;
58896
58900
  const isConnectorSelected = selection.items.findById(this.id);
58897
58901
  if (isConnectorSelected && this.board.selection.getContext() === "EditTextUnderPointer") {
@@ -58905,8 +58909,13 @@ var init_Connector = __esm(() => {
58905
58909
  const { x, y } = this.getMiddlePoint() || this.calculateMiddlePoint();
58906
58910
  const height = this.text.getHeight();
58907
58911
  const width = this.text.getWidth();
58908
- this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
58909
- this.text.updateElement();
58912
+ this._updatingTitle = true;
58913
+ try {
58914
+ this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
58915
+ this.text.updateElement();
58916
+ } finally {
58917
+ this._updatingTitle = false;
58918
+ }
58910
58919
  }
58911
58920
  scalePoints() {
58912
58921
  const origin = new Point(this.getMbr().left, this.getMbr().top);
@@ -63568,6 +63577,11 @@ var init_Drawing = __esm(() => {
63568
63577
  }
63569
63578
  this.updateMbr();
63570
63579
  break;
63580
+ case "Transformation":
63581
+ super.apply(op);
63582
+ this.updateMbr();
63583
+ this.updateLines();
63584
+ break;
63571
63585
  default:
63572
63586
  super.apply(op);
63573
63587
  return;
package/dist/cjs/index.js CHANGED
@@ -58309,6 +58309,7 @@ var init_Connector = __esm(() => {
58309
58309
  animationFrameId;
58310
58310
  text;
58311
58311
  transformationRenderBlock = undefined;
58312
+ _updatingTitle = false;
58312
58313
  optionalFindItemFn;
58313
58314
  constructor(board, startPoint = new BoardPoint, endPoint = new BoardPoint, lineStyle = "straight", startPointerStyle = "None", endPointerStyle = DEFAULT_END_POINTER, lineColor, lineWidth, strokeStyle, id = "") {
58314
58315
  super(board, id);
@@ -58892,6 +58893,9 @@ var init_Connector = __esm(() => {
58892
58893
  return items.find((item) => item instanceof Connector2 && item.getId() === connectorId);
58893
58894
  }
58894
58895
  updateTitle() {
58896
+ if (this._updatingTitle) {
58897
+ return;
58898
+ }
58895
58899
  const selection = this.board.selection;
58896
58900
  const isConnectorSelected = selection.items.findById(this.id);
58897
58901
  if (isConnectorSelected && this.board.selection.getContext() === "EditTextUnderPointer") {
@@ -58905,8 +58909,13 @@ var init_Connector = __esm(() => {
58905
58909
  const { x, y } = this.getMiddlePoint() || this.calculateMiddlePoint();
58906
58910
  const height = this.text.getHeight();
58907
58911
  const width = this.text.getWidth();
58908
- this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
58909
- this.text.updateElement();
58912
+ this._updatingTitle = true;
58913
+ try {
58914
+ this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
58915
+ this.text.updateElement();
58916
+ } finally {
58917
+ this._updatingTitle = false;
58918
+ }
58910
58919
  }
58911
58920
  scalePoints() {
58912
58921
  const origin = new Point(this.getMbr().left, this.getMbr().top);
@@ -63568,6 +63577,11 @@ var init_Drawing = __esm(() => {
63568
63577
  }
63569
63578
  this.updateMbr();
63570
63579
  break;
63580
+ case "Transformation":
63581
+ super.apply(op);
63582
+ this.updateMbr();
63583
+ this.updateLines();
63584
+ break;
63571
63585
  default:
63572
63586
  super.apply(op);
63573
63587
  return;
package/dist/cjs/node.js CHANGED
@@ -60729,6 +60729,7 @@ var init_Connector = __esm(() => {
60729
60729
  animationFrameId;
60730
60730
  text;
60731
60731
  transformationRenderBlock = undefined;
60732
+ _updatingTitle = false;
60732
60733
  optionalFindItemFn;
60733
60734
  constructor(board, startPoint = new BoardPoint, endPoint = new BoardPoint, lineStyle = "straight", startPointerStyle = "None", endPointerStyle = DEFAULT_END_POINTER, lineColor, lineWidth, strokeStyle, id = "") {
60734
60735
  super(board, id);
@@ -61312,6 +61313,9 @@ var init_Connector = __esm(() => {
61312
61313
  return items.find((item) => item instanceof Connector2 && item.getId() === connectorId);
61313
61314
  }
61314
61315
  updateTitle() {
61316
+ if (this._updatingTitle) {
61317
+ return;
61318
+ }
61315
61319
  const selection = this.board.selection;
61316
61320
  const isConnectorSelected = selection.items.findById(this.id);
61317
61321
  if (isConnectorSelected && this.board.selection.getContext() === "EditTextUnderPointer") {
@@ -61325,8 +61329,13 @@ var init_Connector = __esm(() => {
61325
61329
  const { x, y } = this.getMiddlePoint() || this.calculateMiddlePoint();
61326
61330
  const height = this.text.getHeight();
61327
61331
  const width = this.text.getWidth();
61328
- this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
61329
- this.text.updateElement();
61332
+ this._updatingTitle = true;
61333
+ try {
61334
+ this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
61335
+ this.text.updateElement();
61336
+ } finally {
61337
+ this._updatingTitle = false;
61338
+ }
61330
61339
  }
61331
61340
  scalePoints() {
61332
61341
  const origin = new Point(this.getMbr().left, this.getMbr().top);
@@ -65988,6 +65997,11 @@ var init_Drawing = __esm(() => {
65988
65997
  }
65989
65998
  this.updateMbr();
65990
65999
  break;
66000
+ case "Transformation":
66001
+ super.apply(op);
66002
+ this.updateMbr();
66003
+ this.updateLines();
66004
+ break;
65991
66005
  default:
65992
66006
  super.apply(op);
65993
66007
  return;
@@ -58246,6 +58246,7 @@ var init_Connector = __esm(() => {
58246
58246
  animationFrameId;
58247
58247
  text;
58248
58248
  transformationRenderBlock = undefined;
58249
+ _updatingTitle = false;
58249
58250
  optionalFindItemFn;
58250
58251
  constructor(board, startPoint = new BoardPoint, endPoint = new BoardPoint, lineStyle = "straight", startPointerStyle = "None", endPointerStyle = DEFAULT_END_POINTER, lineColor, lineWidth, strokeStyle, id = "") {
58251
58252
  super(board, id);
@@ -58829,6 +58830,9 @@ var init_Connector = __esm(() => {
58829
58830
  return items.find((item) => item instanceof Connector2 && item.getId() === connectorId);
58830
58831
  }
58831
58832
  updateTitle() {
58833
+ if (this._updatingTitle) {
58834
+ return;
58835
+ }
58832
58836
  const selection = this.board.selection;
58833
58837
  const isConnectorSelected = selection.items.findById(this.id);
58834
58838
  if (isConnectorSelected && this.board.selection.getContext() === "EditTextUnderPointer") {
@@ -58842,8 +58846,13 @@ var init_Connector = __esm(() => {
58842
58846
  const { x, y } = this.getMiddlePoint() || this.calculateMiddlePoint();
58843
58847
  const height = this.text.getHeight();
58844
58848
  const width = this.text.getWidth();
58845
- this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
58846
- this.text.updateElement();
58849
+ this._updatingTitle = true;
58850
+ try {
58851
+ this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
58852
+ this.text.updateElement();
58853
+ } finally {
58854
+ this._updatingTitle = false;
58855
+ }
58847
58856
  }
58848
58857
  scalePoints() {
58849
58858
  const origin = new Point(this.getMbr().left, this.getMbr().top);
@@ -63505,6 +63514,11 @@ var init_Drawing = __esm(() => {
63505
63514
  }
63506
63515
  this.updateMbr();
63507
63516
  break;
63517
+ case "Transformation":
63518
+ super.apply(op);
63519
+ this.updateMbr();
63520
+ this.updateLines();
63521
+ break;
63508
63522
  default:
63509
63523
  super.apply(op);
63510
63524
  return;
package/dist/esm/index.js CHANGED
@@ -58239,6 +58239,7 @@ var init_Connector = __esm(() => {
58239
58239
  animationFrameId;
58240
58240
  text;
58241
58241
  transformationRenderBlock = undefined;
58242
+ _updatingTitle = false;
58242
58243
  optionalFindItemFn;
58243
58244
  constructor(board, startPoint = new BoardPoint, endPoint = new BoardPoint, lineStyle = "straight", startPointerStyle = "None", endPointerStyle = DEFAULT_END_POINTER, lineColor, lineWidth, strokeStyle, id = "") {
58244
58245
  super(board, id);
@@ -58822,6 +58823,9 @@ var init_Connector = __esm(() => {
58822
58823
  return items.find((item) => item instanceof Connector2 && item.getId() === connectorId);
58823
58824
  }
58824
58825
  updateTitle() {
58826
+ if (this._updatingTitle) {
58827
+ return;
58828
+ }
58825
58829
  const selection = this.board.selection;
58826
58830
  const isConnectorSelected = selection.items.findById(this.id);
58827
58831
  if (isConnectorSelected && this.board.selection.getContext() === "EditTextUnderPointer") {
@@ -58835,8 +58839,13 @@ var init_Connector = __esm(() => {
58835
58839
  const { x, y } = this.getMiddlePoint() || this.calculateMiddlePoint();
58836
58840
  const height = this.text.getHeight();
58837
58841
  const width = this.text.getWidth();
58838
- this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
58839
- this.text.updateElement();
58842
+ this._updatingTitle = true;
58843
+ try {
58844
+ this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
58845
+ this.text.updateElement();
58846
+ } finally {
58847
+ this._updatingTitle = false;
58848
+ }
58840
58849
  }
58841
58850
  scalePoints() {
58842
58851
  const origin = new Point(this.getMbr().left, this.getMbr().top);
@@ -63498,6 +63507,11 @@ var init_Drawing = __esm(() => {
63498
63507
  }
63499
63508
  this.updateMbr();
63500
63509
  break;
63510
+ case "Transformation":
63511
+ super.apply(op);
63512
+ this.updateMbr();
63513
+ this.updateLines();
63514
+ break;
63501
63515
  default:
63502
63516
  super.apply(op);
63503
63517
  return;
package/dist/esm/node.js CHANGED
@@ -60648,6 +60648,7 @@ var init_Connector = __esm(() => {
60648
60648
  animationFrameId;
60649
60649
  text;
60650
60650
  transformationRenderBlock = undefined;
60651
+ _updatingTitle = false;
60651
60652
  optionalFindItemFn;
60652
60653
  constructor(board, startPoint = new BoardPoint, endPoint = new BoardPoint, lineStyle = "straight", startPointerStyle = "None", endPointerStyle = DEFAULT_END_POINTER, lineColor, lineWidth, strokeStyle, id = "") {
60653
60654
  super(board, id);
@@ -61231,6 +61232,9 @@ var init_Connector = __esm(() => {
61231
61232
  return items.find((item) => item instanceof Connector2 && item.getId() === connectorId);
61232
61233
  }
61233
61234
  updateTitle() {
61235
+ if (this._updatingTitle) {
61236
+ return;
61237
+ }
61234
61238
  const selection = this.board.selection;
61235
61239
  const isConnectorSelected = selection.items.findById(this.id);
61236
61240
  if (isConnectorSelected && this.board.selection.getContext() === "EditTextUnderPointer") {
@@ -61244,8 +61248,13 @@ var init_Connector = __esm(() => {
61244
61248
  const { x, y } = this.getMiddlePoint() || this.calculateMiddlePoint();
61245
61249
  const height = this.text.getHeight();
61246
61250
  const width = this.text.getWidth();
61247
- this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
61248
- this.text.updateElement();
61251
+ this._updatingTitle = true;
61252
+ try {
61253
+ this.text.apply(transformOps.translateTo(this.text, x - width / 2, y - height / 2));
61254
+ this.text.updateElement();
61255
+ } finally {
61256
+ this._updatingTitle = false;
61257
+ }
61249
61258
  }
61250
61259
  scalePoints() {
61251
61260
  const origin = new Point(this.getMbr().left, this.getMbr().top);
@@ -65907,6 +65916,11 @@ var init_Drawing = __esm(() => {
65907
65916
  }
65908
65917
  this.updateMbr();
65909
65918
  break;
65919
+ case "Transformation":
65920
+ super.apply(op);
65921
+ this.updateMbr();
65922
+ this.updateLines();
65923
+ break;
65910
65924
  default:
65911
65925
  super.apply(op);
65912
65926
  return;
@@ -40,6 +40,7 @@ export declare class Connector extends BaseItem<Connector> {
40
40
  animationFrameId?: number;
41
41
  readonly text: RichText;
42
42
  transformationRenderBlock?: boolean;
43
+ private _updatingTitle;
43
44
  private optionalFindItemFn?;
44
45
  constructor(board: Board, startPoint?: ControlPoint, endPoint?: ControlPoint, lineStyle?: ConnectorLineStyle, startPointerStyle?: ConnectorPointerStyle, endPointerStyle?: ConnectorPointerStyle, lineColor?: ColorValue, lineWidth?: ConnectionLineWidth, strokeStyle?: BorderStyle, id?: string);
45
46
  private initText;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.14.0",
3
+ "version": "0.14.2",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",