microboard-temp 0.9.0 → 0.10.1

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.
@@ -43867,8 +43867,11 @@ class ConnectorSnap {
43867
43867
  pointerMove() {
43868
43868
  this.setHover();
43869
43869
  const nearest = this.getNearest();
43870
+ const underPointer = this.hover.item;
43870
43871
  if (this.isNearBorder(nearest)) {
43871
43872
  this.snap.item = nearest;
43873
+ } else if (underPointer && underPointer !== this.connector) {
43874
+ this.snap.item = underPointer;
43872
43875
  } else {
43873
43876
  this.snap.item = null;
43874
43877
  }
@@ -54189,6 +54192,14 @@ class Board {
54189
54192
  setDrawingContext(context) {
54190
54193
  this.drawingContext = context;
54191
54194
  }
54195
+ render(context) {
54196
+ context.clear();
54197
+ drawBackground(context);
54198
+ this.index.items.render(context);
54199
+ this.selection.render(context);
54200
+ this.tools.render(context);
54201
+ this.presence.render(context);
54202
+ }
54192
54203
  apply(op) {
54193
54204
  switch (op.class) {
54194
54205
  case "Board":
package/dist/cjs/index.js CHANGED
@@ -43867,8 +43867,11 @@ class ConnectorSnap {
43867
43867
  pointerMove() {
43868
43868
  this.setHover();
43869
43869
  const nearest = this.getNearest();
43870
+ const underPointer = this.hover.item;
43870
43871
  if (this.isNearBorder(nearest)) {
43871
43872
  this.snap.item = nearest;
43873
+ } else if (underPointer && underPointer !== this.connector) {
43874
+ this.snap.item = underPointer;
43872
43875
  } else {
43873
43876
  this.snap.item = null;
43874
43877
  }
@@ -54189,6 +54192,14 @@ class Board {
54189
54192
  setDrawingContext(context) {
54190
54193
  this.drawingContext = context;
54191
54194
  }
54195
+ render(context) {
54196
+ context.clear();
54197
+ drawBackground(context);
54198
+ this.index.items.render(context);
54199
+ this.selection.render(context);
54200
+ this.tools.render(context);
54201
+ this.presence.render(context);
54202
+ }
54192
54203
  apply(op) {
54193
54204
  switch (op.class) {
54194
54205
  case "Board":
package/dist/cjs/node.js CHANGED
@@ -46340,8 +46340,11 @@ class ConnectorSnap {
46340
46340
  pointerMove() {
46341
46341
  this.setHover();
46342
46342
  const nearest = this.getNearest();
46343
+ const underPointer = this.hover.item;
46343
46344
  if (this.isNearBorder(nearest)) {
46344
46345
  this.snap.item = nearest;
46346
+ } else if (underPointer && underPointer !== this.connector) {
46347
+ this.snap.item = underPointer;
46345
46348
  } else {
46346
46349
  this.snap.item = null;
46347
46350
  }
@@ -56662,6 +56665,14 @@ class Board {
56662
56665
  setDrawingContext(context) {
56663
56666
  this.drawingContext = context;
56664
56667
  }
56668
+ render(context) {
56669
+ context.clear();
56670
+ drawBackground(context);
56671
+ this.index.items.render(context);
56672
+ this.selection.render(context);
56673
+ this.tools.render(context);
56674
+ this.presence.render(context);
56675
+ }
56665
56676
  apply(op) {
56666
56677
  switch (op.class) {
56667
56678
  case "Board":
@@ -43696,8 +43696,11 @@ class ConnectorSnap {
43696
43696
  pointerMove() {
43697
43697
  this.setHover();
43698
43698
  const nearest = this.getNearest();
43699
+ const underPointer = this.hover.item;
43699
43700
  if (this.isNearBorder(nearest)) {
43700
43701
  this.snap.item = nearest;
43702
+ } else if (underPointer && underPointer !== this.connector) {
43703
+ this.snap.item = underPointer;
43701
43704
  } else {
43702
43705
  this.snap.item = null;
43703
43706
  }
@@ -54018,6 +54021,14 @@ class Board {
54018
54021
  setDrawingContext(context) {
54019
54022
  this.drawingContext = context;
54020
54023
  }
54024
+ render(context) {
54025
+ context.clear();
54026
+ drawBackground(context);
54027
+ this.index.items.render(context);
54028
+ this.selection.render(context);
54029
+ this.tools.render(context);
54030
+ this.presence.render(context);
54031
+ }
54021
54032
  apply(op) {
54022
54033
  switch (op.class) {
54023
54034
  case "Board":
package/dist/esm/index.js CHANGED
@@ -43689,8 +43689,11 @@ class ConnectorSnap {
43689
43689
  pointerMove() {
43690
43690
  this.setHover();
43691
43691
  const nearest = this.getNearest();
43692
+ const underPointer = this.hover.item;
43692
43693
  if (this.isNearBorder(nearest)) {
43693
43694
  this.snap.item = nearest;
43695
+ } else if (underPointer && underPointer !== this.connector) {
43696
+ this.snap.item = underPointer;
43694
43697
  } else {
43695
43698
  this.snap.item = null;
43696
43699
  }
@@ -54011,6 +54014,14 @@ class Board {
54011
54014
  setDrawingContext(context) {
54012
54015
  this.drawingContext = context;
54013
54016
  }
54017
+ render(context) {
54018
+ context.clear();
54019
+ drawBackground(context);
54020
+ this.index.items.render(context);
54021
+ this.selection.render(context);
54022
+ this.tools.render(context);
54023
+ this.presence.render(context);
54024
+ }
54014
54025
  apply(op) {
54015
54026
  switch (op.class) {
54016
54027
  case "Board":
package/dist/esm/node.js CHANGED
@@ -46157,8 +46157,11 @@ class ConnectorSnap {
46157
46157
  pointerMove() {
46158
46158
  this.setHover();
46159
46159
  const nearest = this.getNearest();
46160
+ const underPointer = this.hover.item;
46160
46161
  if (this.isNearBorder(nearest)) {
46161
46162
  this.snap.item = nearest;
46163
+ } else if (underPointer && underPointer !== this.connector) {
46164
+ this.snap.item = underPointer;
46162
46165
  } else {
46163
46166
  this.snap.item = null;
46164
46167
  }
@@ -56479,6 +56482,14 @@ class Board {
56479
56482
  setDrawingContext(context) {
56480
56483
  this.drawingContext = context;
56481
56484
  }
56485
+ render(context) {
56486
+ context.clear();
56487
+ drawBackground(context);
56488
+ this.index.items.render(context);
56489
+ this.selection.render(context);
56490
+ this.tools.render(context);
56491
+ this.presence.render(context);
56492
+ }
56482
56493
  apply(op) {
56483
56494
  switch (op.class) {
56484
56495
  case "Board":
@@ -56,6 +56,7 @@ export declare class Board {
56
56
  setBoardId(boardId: string): void;
57
57
  getDrawingContext(): DrawingContext | null;
58
58
  setDrawingContext(context: DrawingContext): void;
59
+ render(context: DrawingContext): void;
59
60
  apply(op: Operation): void;
60
61
  private applyBoardOperation;
61
62
  private applyAddItems;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.9.0",
3
+ "version": "0.10.1",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",