microboard-temp 0.4.97 → 0.4.98

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.
@@ -18999,6 +18999,7 @@ class Comment {
18999
18999
  subject = new Subject;
19000
19000
  linkTo;
19001
19001
  transformationRenderBlock = undefined;
19002
+ enableResize = true;
19002
19003
  constructor(anchor = new Point, events, id = "") {
19003
19004
  this.anchor = anchor;
19004
19005
  this.events = events;
@@ -21477,6 +21478,7 @@ class BaseItem extends Mbr {
21477
21478
  shouldUseCustomRender = false;
21478
21479
  shouldRenderOutsideViewRect = true;
21479
21480
  shouldUseRelativeAlignment = true;
21481
+ enableResize = true;
21480
21482
  itemType = "";
21481
21483
  constructor(board, id = "", defaultItemData, isGroupItem) {
21482
21484
  super();
@@ -47827,6 +47829,7 @@ class Card extends BaseItem {
47827
47829
  backside = null;
47828
47830
  imageToRender = null;
47829
47831
  shouldUseCustomRender = false;
47832
+ enableResize = false;
47830
47833
  constructor(board, id = "", urls) {
47831
47834
  super(board, id, defaultCardData);
47832
47835
  if (urls) {
@@ -47934,6 +47937,7 @@ class Deck extends BaseItem {
47934
47937
  shouldUseCustomRender = false;
47935
47938
  cachedCanvas = null;
47936
47939
  isCacheDirty = true;
47940
+ enableResize = false;
47937
47941
  constructor(board, id = "") {
47938
47942
  super(board, id, defaultDeckData, true);
47939
47943
  this.index.getUnderPoint = () => [];
@@ -48088,6 +48092,7 @@ class Deck extends BaseItem {
48088
48092
  });
48089
48093
  this.cachedCanvas = tempCanvas;
48090
48094
  this.isCacheDirty = false;
48095
+ this.updateMbr();
48091
48096
  }
48092
48097
  }
48093
48098
  registerItem({
@@ -51625,7 +51630,8 @@ class Transformer extends Tool {
51625
51630
  return false;
51626
51631
  }
51627
51632
  const isLockedItems = this.selection.getIsLockedSelection();
51628
- if (isLockedItems) {
51633
+ const isResizeEnabled = this.selection.getIsResizeEnabled();
51634
+ if (isLockedItems || !isResizeEnabled) {
51629
51635
  return false;
51630
51636
  }
51631
51637
  this.updateAnchorType();
@@ -52868,6 +52874,10 @@ class BoardSelection {
52868
52874
  this.board.tools.getSelect()?.nestingHighlighter.clear();
52869
52875
  this.setContext("None");
52870
52876
  }
52877
+ getIsResizeEnabled() {
52878
+ const items = this.list();
52879
+ return !items.some((item) => !item.enableResize);
52880
+ }
52871
52881
  getIsLockedSelection() {
52872
52882
  const items = this.list();
52873
52883
  return items.some((item) => item.transformation.isLocked);
package/dist/cjs/index.js CHANGED
@@ -18999,6 +18999,7 @@ class Comment {
18999
18999
  subject = new Subject;
19000
19000
  linkTo;
19001
19001
  transformationRenderBlock = undefined;
19002
+ enableResize = true;
19002
19003
  constructor(anchor = new Point, events, id = "") {
19003
19004
  this.anchor = anchor;
19004
19005
  this.events = events;
@@ -21477,6 +21478,7 @@ class BaseItem extends Mbr {
21477
21478
  shouldUseCustomRender = false;
21478
21479
  shouldRenderOutsideViewRect = true;
21479
21480
  shouldUseRelativeAlignment = true;
21481
+ enableResize = true;
21480
21482
  itemType = "";
21481
21483
  constructor(board, id = "", defaultItemData, isGroupItem) {
21482
21484
  super();
@@ -47827,6 +47829,7 @@ class Card extends BaseItem {
47827
47829
  backside = null;
47828
47830
  imageToRender = null;
47829
47831
  shouldUseCustomRender = false;
47832
+ enableResize = false;
47830
47833
  constructor(board, id = "", urls) {
47831
47834
  super(board, id, defaultCardData);
47832
47835
  if (urls) {
@@ -47934,6 +47937,7 @@ class Deck extends BaseItem {
47934
47937
  shouldUseCustomRender = false;
47935
47938
  cachedCanvas = null;
47936
47939
  isCacheDirty = true;
47940
+ enableResize = false;
47937
47941
  constructor(board, id = "") {
47938
47942
  super(board, id, defaultDeckData, true);
47939
47943
  this.index.getUnderPoint = () => [];
@@ -48088,6 +48092,7 @@ class Deck extends BaseItem {
48088
48092
  });
48089
48093
  this.cachedCanvas = tempCanvas;
48090
48094
  this.isCacheDirty = false;
48095
+ this.updateMbr();
48091
48096
  }
48092
48097
  }
48093
48098
  registerItem({
@@ -51625,7 +51630,8 @@ class Transformer extends Tool {
51625
51630
  return false;
51626
51631
  }
51627
51632
  const isLockedItems = this.selection.getIsLockedSelection();
51628
- if (isLockedItems) {
51633
+ const isResizeEnabled = this.selection.getIsResizeEnabled();
51634
+ if (isLockedItems || !isResizeEnabled) {
51629
51635
  return false;
51630
51636
  }
51631
51637
  this.updateAnchorType();
@@ -52868,6 +52874,10 @@ class BoardSelection {
52868
52874
  this.board.tools.getSelect()?.nestingHighlighter.clear();
52869
52875
  this.setContext("None");
52870
52876
  }
52877
+ getIsResizeEnabled() {
52878
+ const items = this.list();
52879
+ return !items.some((item) => !item.enableResize);
52880
+ }
52871
52881
  getIsLockedSelection() {
52872
52882
  const items = this.list();
52873
52883
  return items.some((item) => item.transformation.isLocked);
package/dist/cjs/node.js CHANGED
@@ -21538,6 +21538,7 @@ class Comment {
21538
21538
  subject = new Subject;
21539
21539
  linkTo;
21540
21540
  transformationRenderBlock = undefined;
21541
+ enableResize = true;
21541
21542
  constructor(anchor = new Point, events, id = "") {
21542
21543
  this.anchor = anchor;
21543
21544
  this.events = events;
@@ -23949,6 +23950,7 @@ class BaseItem extends Mbr {
23949
23950
  shouldUseCustomRender = false;
23950
23951
  shouldRenderOutsideViewRect = true;
23951
23952
  shouldUseRelativeAlignment = true;
23953
+ enableResize = true;
23952
23954
  itemType = "";
23953
23955
  constructor(board, id = "", defaultItemData, isGroupItem) {
23954
23956
  super();
@@ -50300,6 +50302,7 @@ class Card extends BaseItem {
50300
50302
  backside = null;
50301
50303
  imageToRender = null;
50302
50304
  shouldUseCustomRender = false;
50305
+ enableResize = false;
50303
50306
  constructor(board, id = "", urls) {
50304
50307
  super(board, id, defaultCardData);
50305
50308
  if (urls) {
@@ -50407,6 +50410,7 @@ class Deck extends BaseItem {
50407
50410
  shouldUseCustomRender = false;
50408
50411
  cachedCanvas = null;
50409
50412
  isCacheDirty = true;
50413
+ enableResize = false;
50410
50414
  constructor(board, id = "") {
50411
50415
  super(board, id, defaultDeckData, true);
50412
50416
  this.index.getUnderPoint = () => [];
@@ -50561,6 +50565,7 @@ class Deck extends BaseItem {
50561
50565
  });
50562
50566
  this.cachedCanvas = tempCanvas;
50563
50567
  this.isCacheDirty = false;
50568
+ this.updateMbr();
50564
50569
  }
50565
50570
  }
50566
50571
  registerItem({
@@ -54098,7 +54103,8 @@ class Transformer extends Tool {
54098
54103
  return false;
54099
54104
  }
54100
54105
  const isLockedItems = this.selection.getIsLockedSelection();
54101
- if (isLockedItems) {
54106
+ const isResizeEnabled = this.selection.getIsResizeEnabled();
54107
+ if (isLockedItems || !isResizeEnabled) {
54102
54108
  return false;
54103
54109
  }
54104
54110
  this.updateAnchorType();
@@ -55341,6 +55347,10 @@ class BoardSelection {
55341
55347
  this.board.tools.getSelect()?.nestingHighlighter.clear();
55342
55348
  this.setContext("None");
55343
55349
  }
55350
+ getIsResizeEnabled() {
55351
+ const items = this.list();
55352
+ return !items.some((item) => !item.enableResize);
55353
+ }
55344
55354
  getIsLockedSelection() {
55345
55355
  const items = this.list();
55346
55356
  return items.some((item) => item.transformation.isLocked);
@@ -18848,6 +18848,7 @@ class Comment {
18848
18848
  subject = new Subject;
18849
18849
  linkTo;
18850
18850
  transformationRenderBlock = undefined;
18851
+ enableResize = true;
18851
18852
  constructor(anchor = new Point, events, id = "") {
18852
18853
  this.anchor = anchor;
18853
18854
  this.events = events;
@@ -21326,6 +21327,7 @@ class BaseItem extends Mbr {
21326
21327
  shouldUseCustomRender = false;
21327
21328
  shouldRenderOutsideViewRect = true;
21328
21329
  shouldUseRelativeAlignment = true;
21330
+ enableResize = true;
21329
21331
  itemType = "";
21330
21332
  constructor(board, id = "", defaultItemData, isGroupItem) {
21331
21333
  super();
@@ -47676,6 +47678,7 @@ class Card extends BaseItem {
47676
47678
  backside = null;
47677
47679
  imageToRender = null;
47678
47680
  shouldUseCustomRender = false;
47681
+ enableResize = false;
47679
47682
  constructor(board, id = "", urls) {
47680
47683
  super(board, id, defaultCardData);
47681
47684
  if (urls) {
@@ -47783,6 +47786,7 @@ class Deck extends BaseItem {
47783
47786
  shouldUseCustomRender = false;
47784
47787
  cachedCanvas = null;
47785
47788
  isCacheDirty = true;
47789
+ enableResize = false;
47786
47790
  constructor(board, id = "") {
47787
47791
  super(board, id, defaultDeckData, true);
47788
47792
  this.index.getUnderPoint = () => [];
@@ -47937,6 +47941,7 @@ class Deck extends BaseItem {
47937
47941
  });
47938
47942
  this.cachedCanvas = tempCanvas;
47939
47943
  this.isCacheDirty = false;
47944
+ this.updateMbr();
47940
47945
  }
47941
47946
  }
47942
47947
  registerItem({
@@ -51474,7 +51479,8 @@ class Transformer extends Tool {
51474
51479
  return false;
51475
51480
  }
51476
51481
  const isLockedItems = this.selection.getIsLockedSelection();
51477
- if (isLockedItems) {
51482
+ const isResizeEnabled = this.selection.getIsResizeEnabled();
51483
+ if (isLockedItems || !isResizeEnabled) {
51478
51484
  return false;
51479
51485
  }
51480
51486
  this.updateAnchorType();
@@ -52717,6 +52723,10 @@ class BoardSelection {
52717
52723
  this.board.tools.getSelect()?.nestingHighlighter.clear();
52718
52724
  this.setContext("None");
52719
52725
  }
52726
+ getIsResizeEnabled() {
52727
+ const items = this.list();
52728
+ return !items.some((item) => !item.enableResize);
52729
+ }
52720
52730
  getIsLockedSelection() {
52721
52731
  const items = this.list();
52722
52732
  return items.some((item) => item.transformation.isLocked);
package/dist/esm/index.js CHANGED
@@ -18841,6 +18841,7 @@ class Comment {
18841
18841
  subject = new Subject;
18842
18842
  linkTo;
18843
18843
  transformationRenderBlock = undefined;
18844
+ enableResize = true;
18844
18845
  constructor(anchor = new Point, events, id = "") {
18845
18846
  this.anchor = anchor;
18846
18847
  this.events = events;
@@ -21319,6 +21320,7 @@ class BaseItem extends Mbr {
21319
21320
  shouldUseCustomRender = false;
21320
21321
  shouldRenderOutsideViewRect = true;
21321
21322
  shouldUseRelativeAlignment = true;
21323
+ enableResize = true;
21322
21324
  itemType = "";
21323
21325
  constructor(board, id = "", defaultItemData, isGroupItem) {
21324
21326
  super();
@@ -47669,6 +47671,7 @@ class Card extends BaseItem {
47669
47671
  backside = null;
47670
47672
  imageToRender = null;
47671
47673
  shouldUseCustomRender = false;
47674
+ enableResize = false;
47672
47675
  constructor(board, id = "", urls) {
47673
47676
  super(board, id, defaultCardData);
47674
47677
  if (urls) {
@@ -47776,6 +47779,7 @@ class Deck extends BaseItem {
47776
47779
  shouldUseCustomRender = false;
47777
47780
  cachedCanvas = null;
47778
47781
  isCacheDirty = true;
47782
+ enableResize = false;
47779
47783
  constructor(board, id = "") {
47780
47784
  super(board, id, defaultDeckData, true);
47781
47785
  this.index.getUnderPoint = () => [];
@@ -47930,6 +47934,7 @@ class Deck extends BaseItem {
47930
47934
  });
47931
47935
  this.cachedCanvas = tempCanvas;
47932
47936
  this.isCacheDirty = false;
47937
+ this.updateMbr();
47933
47938
  }
47934
47939
  }
47935
47940
  registerItem({
@@ -51467,7 +51472,8 @@ class Transformer extends Tool {
51467
51472
  return false;
51468
51473
  }
51469
51474
  const isLockedItems = this.selection.getIsLockedSelection();
51470
- if (isLockedItems) {
51475
+ const isResizeEnabled = this.selection.getIsResizeEnabled();
51476
+ if (isLockedItems || !isResizeEnabled) {
51471
51477
  return false;
51472
51478
  }
51473
51479
  this.updateAnchorType();
@@ -52710,6 +52716,10 @@ class BoardSelection {
52710
52716
  this.board.tools.getSelect()?.nestingHighlighter.clear();
52711
52717
  this.setContext("None");
52712
52718
  }
52719
+ getIsResizeEnabled() {
52720
+ const items = this.list();
52721
+ return !items.some((item) => !item.enableResize);
52722
+ }
52713
52723
  getIsLockedSelection() {
52714
52724
  const items = this.list();
52715
52725
  return items.some((item) => item.transformation.isLocked);
package/dist/esm/node.js CHANGED
@@ -21375,6 +21375,7 @@ class Comment {
21375
21375
  subject = new Subject;
21376
21376
  linkTo;
21377
21377
  transformationRenderBlock = undefined;
21378
+ enableResize = true;
21378
21379
  constructor(anchor = new Point, events, id = "") {
21379
21380
  this.anchor = anchor;
21380
21381
  this.events = events;
@@ -23786,6 +23787,7 @@ class BaseItem extends Mbr {
23786
23787
  shouldUseCustomRender = false;
23787
23788
  shouldRenderOutsideViewRect = true;
23788
23789
  shouldUseRelativeAlignment = true;
23790
+ enableResize = true;
23789
23791
  itemType = "";
23790
23792
  constructor(board, id = "", defaultItemData, isGroupItem) {
23791
23793
  super();
@@ -50137,6 +50139,7 @@ class Card extends BaseItem {
50137
50139
  backside = null;
50138
50140
  imageToRender = null;
50139
50141
  shouldUseCustomRender = false;
50142
+ enableResize = false;
50140
50143
  constructor(board, id = "", urls) {
50141
50144
  super(board, id, defaultCardData);
50142
50145
  if (urls) {
@@ -50244,6 +50247,7 @@ class Deck extends BaseItem {
50244
50247
  shouldUseCustomRender = false;
50245
50248
  cachedCanvas = null;
50246
50249
  isCacheDirty = true;
50250
+ enableResize = false;
50247
50251
  constructor(board, id = "") {
50248
50252
  super(board, id, defaultDeckData, true);
50249
50253
  this.index.getUnderPoint = () => [];
@@ -50398,6 +50402,7 @@ class Deck extends BaseItem {
50398
50402
  });
50399
50403
  this.cachedCanvas = tempCanvas;
50400
50404
  this.isCacheDirty = false;
50405
+ this.updateMbr();
50401
50406
  }
50402
50407
  }
50403
50408
  registerItem({
@@ -53935,7 +53940,8 @@ class Transformer extends Tool {
53935
53940
  return false;
53936
53941
  }
53937
53942
  const isLockedItems = this.selection.getIsLockedSelection();
53938
- if (isLockedItems) {
53943
+ const isResizeEnabled = this.selection.getIsResizeEnabled();
53944
+ if (isLockedItems || !isResizeEnabled) {
53939
53945
  return false;
53940
53946
  }
53941
53947
  this.updateAnchorType();
@@ -55178,6 +55184,10 @@ class BoardSelection {
55178
55184
  this.board.tools.getSelect()?.nestingHighlighter.clear();
55179
55185
  this.setContext("None");
55180
55186
  }
55187
+ getIsResizeEnabled() {
55188
+ const items = this.list();
55189
+ return !items.some((item) => !item.enableResize);
55190
+ }
55181
55191
  getIsLockedSelection() {
55182
55192
  const items = this.list();
55183
55193
  return items.some((item) => item.transformation.isLocked);
@@ -37,6 +37,7 @@ export declare class BaseItem extends Mbr implements Geometry {
37
37
  shouldUseCustomRender: boolean;
38
38
  shouldRenderOutsideViewRect: boolean;
39
39
  shouldUseRelativeAlignment: boolean;
40
+ enableResize: boolean;
40
41
  itemType: string;
41
42
  constructor(board: Board, id?: string, defaultItemData?: BaseItemData | undefined, isGroupItem?: boolean);
42
43
  getId(): string;
@@ -47,6 +47,7 @@ export declare class Comment implements Geometry {
47
47
  readonly subject: Subject<Comment>;
48
48
  readonly linkTo: LinkTo;
49
49
  transformationRenderBlock?: boolean;
50
+ enableResize: boolean;
50
51
  constructor(anchor?: Point, events?: Events | undefined, id?: string);
51
52
  serialize(): CommentData;
52
53
  deserialize(data: CommentData): this;
@@ -20,6 +20,7 @@ export declare class Card extends BaseItem {
20
20
  backside: HTMLImageElement | null;
21
21
  private imageToRender;
22
22
  shouldUseCustomRender: boolean;
23
+ enableResize: boolean;
23
24
  constructor(board: Board, id?: string, urls?: {
24
25
  faceUrl: string;
25
26
  backsideUrl: string;
@@ -10,6 +10,7 @@ export declare class Deck extends BaseItem {
10
10
  shouldUseCustomRender: boolean;
11
11
  private cachedCanvas;
12
12
  private isCacheDirty;
13
+ enableResize: boolean;
13
14
  constructor(board: Board, id?: string);
14
15
  applyAddChildren(childIds: string[]): void;
15
16
  applyRemoveChildren(childIds: string[]): void;
@@ -131,6 +131,7 @@ export declare class BoardSelection {
131
131
  setHorisontalAlignment(horisontalAlignment: HorisontalAlignment): void;
132
132
  setVerticalAlignment(verticalAlignment: VerticalAlignment): void;
133
133
  removeFromBoard(): void;
134
+ getIsResizeEnabled(): boolean;
134
135
  getIsLockedSelection(): boolean;
135
136
  isLocked(): boolean;
136
137
  lock(): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.4.97",
3
+ "version": "0.4.98",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",