microboard-temp 0.11.8 → 0.11.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.
@@ -22380,7 +22380,7 @@ class RichText extends BaseItem {
22380
22380
  }
22381
22381
  getMaxWidth() {
22382
22382
  if (this.autoSize) {
22383
- return this.editor.maxWidth;
22383
+ return this.editor.maxWidth || this.getTransformedContainer().getWidth();
22384
22384
  }
22385
22385
  if (this.isContainerSet) {
22386
22386
  return this.getTransformedContainer().getWidth();
@@ -22415,6 +22415,13 @@ class RichText extends BaseItem {
22415
22415
  const point3 = new Point(left, top);
22416
22416
  if (this.worldMatrixGetter) {
22417
22417
  this.worldMatrixGetter().apply(point3);
22418
+ } else if (this.isInShape) {
22419
+ const item = this.board.items.getById(this.id);
22420
+ if (item) {
22421
+ item.getParentWorldMatrix().apply(point3);
22422
+ } else {
22423
+ this.getParentWorldMatrix().apply(point3);
22424
+ }
22418
22425
  } else {
22419
22426
  this.getParentWorldMatrix().apply(point3);
22420
22427
  }
@@ -22424,7 +22431,7 @@ class RichText extends BaseItem {
22424
22431
  height,
22425
22432
  maxWidth: maxWidth ? maxWidth + 1 : undefined,
22426
22433
  maxHeight,
22427
- textScale: this.isInShape ? 1 : this.getScale()
22434
+ textScale: this.getScale()
22428
22435
  };
22429
22436
  }
22430
22437
  transformCanvas() {
@@ -40483,7 +40490,6 @@ class Sticker extends BaseItem {
40483
40490
  this.linkTo = new LinkTo(this.id, this.board.events);
40484
40491
  this.transformation = new Transformation(this.id, this.board.events);
40485
40492
  this.text = new RichText(board, this.textContainer, this.id, this.transformation, this.linkTo, " ", false, true, this.itemType);
40486
- this.text.worldMatrixGetter = () => this.getParentWorldMatrix();
40487
40493
  this.transformation.subject.subscribe((_subject, op) => {
40488
40494
  this.transformPath();
40489
40495
  if (op.method === "applyMatrix") {
package/dist/cjs/index.js CHANGED
@@ -22380,7 +22380,7 @@ class RichText extends BaseItem {
22380
22380
  }
22381
22381
  getMaxWidth() {
22382
22382
  if (this.autoSize) {
22383
- return this.editor.maxWidth;
22383
+ return this.editor.maxWidth || this.getTransformedContainer().getWidth();
22384
22384
  }
22385
22385
  if (this.isContainerSet) {
22386
22386
  return this.getTransformedContainer().getWidth();
@@ -22415,6 +22415,13 @@ class RichText extends BaseItem {
22415
22415
  const point3 = new Point(left, top);
22416
22416
  if (this.worldMatrixGetter) {
22417
22417
  this.worldMatrixGetter().apply(point3);
22418
+ } else if (this.isInShape) {
22419
+ const item = this.board.items.getById(this.id);
22420
+ if (item) {
22421
+ item.getParentWorldMatrix().apply(point3);
22422
+ } else {
22423
+ this.getParentWorldMatrix().apply(point3);
22424
+ }
22418
22425
  } else {
22419
22426
  this.getParentWorldMatrix().apply(point3);
22420
22427
  }
@@ -22424,7 +22431,7 @@ class RichText extends BaseItem {
22424
22431
  height,
22425
22432
  maxWidth: maxWidth ? maxWidth + 1 : undefined,
22426
22433
  maxHeight,
22427
- textScale: this.isInShape ? 1 : this.getScale()
22434
+ textScale: this.getScale()
22428
22435
  };
22429
22436
  }
22430
22437
  transformCanvas() {
@@ -40483,7 +40490,6 @@ class Sticker extends BaseItem {
40483
40490
  this.linkTo = new LinkTo(this.id, this.board.events);
40484
40491
  this.transformation = new Transformation(this.id, this.board.events);
40485
40492
  this.text = new RichText(board, this.textContainer, this.id, this.transformation, this.linkTo, " ", false, true, this.itemType);
40486
- this.text.worldMatrixGetter = () => this.getParentWorldMatrix();
40487
40493
  this.transformation.subject.subscribe((_subject, op) => {
40488
40494
  this.transformPath();
40489
40495
  if (op.method === "applyMatrix") {
package/dist/cjs/node.js CHANGED
@@ -24852,7 +24852,7 @@ class RichText extends BaseItem {
24852
24852
  }
24853
24853
  getMaxWidth() {
24854
24854
  if (this.autoSize) {
24855
- return this.editor.maxWidth;
24855
+ return this.editor.maxWidth || this.getTransformedContainer().getWidth();
24856
24856
  }
24857
24857
  if (this.isContainerSet) {
24858
24858
  return this.getTransformedContainer().getWidth();
@@ -24887,6 +24887,13 @@ class RichText extends BaseItem {
24887
24887
  const point3 = new Point(left, top);
24888
24888
  if (this.worldMatrixGetter) {
24889
24889
  this.worldMatrixGetter().apply(point3);
24890
+ } else if (this.isInShape) {
24891
+ const item = this.board.items.getById(this.id);
24892
+ if (item) {
24893
+ item.getParentWorldMatrix().apply(point3);
24894
+ } else {
24895
+ this.getParentWorldMatrix().apply(point3);
24896
+ }
24890
24897
  } else {
24891
24898
  this.getParentWorldMatrix().apply(point3);
24892
24899
  }
@@ -24896,7 +24903,7 @@ class RichText extends BaseItem {
24896
24903
  height,
24897
24904
  maxWidth: maxWidth ? maxWidth + 1 : undefined,
24898
24905
  maxHeight,
24899
- textScale: this.isInShape ? 1 : this.getScale()
24906
+ textScale: this.getScale()
24900
24907
  };
24901
24908
  }
24902
24909
  transformCanvas() {
@@ -42956,7 +42963,6 @@ class Sticker extends BaseItem {
42956
42963
  this.linkTo = new LinkTo(this.id, this.board.events);
42957
42964
  this.transformation = new Transformation(this.id, this.board.events);
42958
42965
  this.text = new RichText(board, this.textContainer, this.id, this.transformation, this.linkTo, " ", false, true, this.itemType);
42959
- this.text.worldMatrixGetter = () => this.getParentWorldMatrix();
42960
42966
  this.transformation.subject.subscribe((_subject, op) => {
42961
42967
  this.transformPath();
42962
42968
  if (op.method === "applyMatrix") {
@@ -22209,7 +22209,7 @@ class RichText extends BaseItem {
22209
22209
  }
22210
22210
  getMaxWidth() {
22211
22211
  if (this.autoSize) {
22212
- return this.editor.maxWidth;
22212
+ return this.editor.maxWidth || this.getTransformedContainer().getWidth();
22213
22213
  }
22214
22214
  if (this.isContainerSet) {
22215
22215
  return this.getTransformedContainer().getWidth();
@@ -22244,6 +22244,13 @@ class RichText extends BaseItem {
22244
22244
  const point3 = new Point(left, top);
22245
22245
  if (this.worldMatrixGetter) {
22246
22246
  this.worldMatrixGetter().apply(point3);
22247
+ } else if (this.isInShape) {
22248
+ const item = this.board.items.getById(this.id);
22249
+ if (item) {
22250
+ item.getParentWorldMatrix().apply(point3);
22251
+ } else {
22252
+ this.getParentWorldMatrix().apply(point3);
22253
+ }
22247
22254
  } else {
22248
22255
  this.getParentWorldMatrix().apply(point3);
22249
22256
  }
@@ -22253,7 +22260,7 @@ class RichText extends BaseItem {
22253
22260
  height,
22254
22261
  maxWidth: maxWidth ? maxWidth + 1 : undefined,
22255
22262
  maxHeight,
22256
- textScale: this.isInShape ? 1 : this.getScale()
22263
+ textScale: this.getScale()
22257
22264
  };
22258
22265
  }
22259
22266
  transformCanvas() {
@@ -40312,7 +40319,6 @@ class Sticker extends BaseItem {
40312
40319
  this.linkTo = new LinkTo(this.id, this.board.events);
40313
40320
  this.transformation = new Transformation(this.id, this.board.events);
40314
40321
  this.text = new RichText(board, this.textContainer, this.id, this.transformation, this.linkTo, " ", false, true, this.itemType);
40315
- this.text.worldMatrixGetter = () => this.getParentWorldMatrix();
40316
40322
  this.transformation.subject.subscribe((_subject, op) => {
40317
40323
  this.transformPath();
40318
40324
  if (op.method === "applyMatrix") {
package/dist/esm/index.js CHANGED
@@ -22202,7 +22202,7 @@ class RichText extends BaseItem {
22202
22202
  }
22203
22203
  getMaxWidth() {
22204
22204
  if (this.autoSize) {
22205
- return this.editor.maxWidth;
22205
+ return this.editor.maxWidth || this.getTransformedContainer().getWidth();
22206
22206
  }
22207
22207
  if (this.isContainerSet) {
22208
22208
  return this.getTransformedContainer().getWidth();
@@ -22237,6 +22237,13 @@ class RichText extends BaseItem {
22237
22237
  const point3 = new Point(left, top);
22238
22238
  if (this.worldMatrixGetter) {
22239
22239
  this.worldMatrixGetter().apply(point3);
22240
+ } else if (this.isInShape) {
22241
+ const item = this.board.items.getById(this.id);
22242
+ if (item) {
22243
+ item.getParentWorldMatrix().apply(point3);
22244
+ } else {
22245
+ this.getParentWorldMatrix().apply(point3);
22246
+ }
22240
22247
  } else {
22241
22248
  this.getParentWorldMatrix().apply(point3);
22242
22249
  }
@@ -22246,7 +22253,7 @@ class RichText extends BaseItem {
22246
22253
  height,
22247
22254
  maxWidth: maxWidth ? maxWidth + 1 : undefined,
22248
22255
  maxHeight,
22249
- textScale: this.isInShape ? 1 : this.getScale()
22256
+ textScale: this.getScale()
22250
22257
  };
22251
22258
  }
22252
22259
  transformCanvas() {
@@ -40305,7 +40312,6 @@ class Sticker extends BaseItem {
40305
40312
  this.linkTo = new LinkTo(this.id, this.board.events);
40306
40313
  this.transformation = new Transformation(this.id, this.board.events);
40307
40314
  this.text = new RichText(board, this.textContainer, this.id, this.transformation, this.linkTo, " ", false, true, this.itemType);
40308
- this.text.worldMatrixGetter = () => this.getParentWorldMatrix();
40309
40315
  this.transformation.subject.subscribe((_subject, op) => {
40310
40316
  this.transformPath();
40311
40317
  if (op.method === "applyMatrix") {
package/dist/esm/node.js CHANGED
@@ -24669,7 +24669,7 @@ class RichText extends BaseItem {
24669
24669
  }
24670
24670
  getMaxWidth() {
24671
24671
  if (this.autoSize) {
24672
- return this.editor.maxWidth;
24672
+ return this.editor.maxWidth || this.getTransformedContainer().getWidth();
24673
24673
  }
24674
24674
  if (this.isContainerSet) {
24675
24675
  return this.getTransformedContainer().getWidth();
@@ -24704,6 +24704,13 @@ class RichText extends BaseItem {
24704
24704
  const point3 = new Point(left, top);
24705
24705
  if (this.worldMatrixGetter) {
24706
24706
  this.worldMatrixGetter().apply(point3);
24707
+ } else if (this.isInShape) {
24708
+ const item = this.board.items.getById(this.id);
24709
+ if (item) {
24710
+ item.getParentWorldMatrix().apply(point3);
24711
+ } else {
24712
+ this.getParentWorldMatrix().apply(point3);
24713
+ }
24707
24714
  } else {
24708
24715
  this.getParentWorldMatrix().apply(point3);
24709
24716
  }
@@ -24713,7 +24720,7 @@ class RichText extends BaseItem {
24713
24720
  height,
24714
24721
  maxWidth: maxWidth ? maxWidth + 1 : undefined,
24715
24722
  maxHeight,
24716
- textScale: this.isInShape ? 1 : this.getScale()
24723
+ textScale: this.getScale()
24717
24724
  };
24718
24725
  }
24719
24726
  transformCanvas() {
@@ -42773,7 +42780,6 @@ class Sticker extends BaseItem {
42773
42780
  this.linkTo = new LinkTo(this.id, this.board.events);
42774
42781
  this.transformation = new Transformation(this.id, this.board.events);
42775
42782
  this.text = new RichText(board, this.textContainer, this.id, this.transformation, this.linkTo, " ", false, true, this.itemType);
42776
- this.text.worldMatrixGetter = () => this.getParentWorldMatrix();
42777
42783
  this.transformation.subject.subscribe((_subject, op) => {
42778
42784
  this.transformPath();
42779
42785
  if (op.method === "applyMatrix") {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.11.8",
3
+ "version": "0.11.9",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",