microboard-temp 0.5.152 → 0.6.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.
- package/dist/cjs/browser.js +22 -0
- package/dist/cjs/index.js +22 -0
- package/dist/cjs/node.js +22 -0
- package/dist/esm/browser.js +22 -0
- package/dist/esm/index.js +22 -0
- package/dist/esm/node.js +22 -0
- package/dist/types/Items/BaseItem/BaseItem.d.ts +5 -0
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -21310,6 +21310,9 @@ class Items {
|
|
|
21310
21310
|
item.render(context);
|
|
21311
21311
|
}
|
|
21312
21312
|
});
|
|
21313
|
+
items.forEach((item) => {
|
|
21314
|
+
item.renderHoverHighlight(context);
|
|
21315
|
+
});
|
|
21313
21316
|
}
|
|
21314
21317
|
renderHTML(documentFactory) {
|
|
21315
21318
|
const items = this.getItemsInView();
|
|
@@ -21576,6 +21579,8 @@ class BaseItem extends Mbr {
|
|
|
21576
21579
|
onlyProportionalResize = false;
|
|
21577
21580
|
itemType = "";
|
|
21578
21581
|
children = [];
|
|
21582
|
+
isHoverHighlighted = false;
|
|
21583
|
+
static HOVER_HIGHLIGHT_COLOR = "rgba(71, 120, 245, 0.7)";
|
|
21579
21584
|
constructor(board, id = "", defaultItemData, isGroupItem) {
|
|
21580
21585
|
super();
|
|
21581
21586
|
this.defaultItemData = defaultItemData;
|
|
@@ -21863,6 +21868,23 @@ class BaseItem extends Mbr {
|
|
|
21863
21868
|
getPath() {
|
|
21864
21869
|
return new Path(this.getMbr().getLines(), true);
|
|
21865
21870
|
}
|
|
21871
|
+
highlightMbr() {
|
|
21872
|
+
this.isHoverHighlighted = true;
|
|
21873
|
+
this.subject.publish(this);
|
|
21874
|
+
}
|
|
21875
|
+
clearHighlightMbr() {
|
|
21876
|
+
this.isHoverHighlighted = false;
|
|
21877
|
+
this.subject.publish(this);
|
|
21878
|
+
}
|
|
21879
|
+
renderHoverHighlight(context) {
|
|
21880
|
+
if (!this.isHoverHighlighted) {
|
|
21881
|
+
return;
|
|
21882
|
+
}
|
|
21883
|
+
const mbr = this.getMbr();
|
|
21884
|
+
mbr.strokeWidth = 2 / context.matrix.scaleX;
|
|
21885
|
+
mbr.borderColor = BaseItem.HOVER_HIGHLIGHT_COLOR;
|
|
21886
|
+
mbr.render(context);
|
|
21887
|
+
}
|
|
21866
21888
|
render(context) {
|
|
21867
21889
|
if (this.index) {
|
|
21868
21890
|
this.index.render(context);
|
package/dist/cjs/index.js
CHANGED
|
@@ -21310,6 +21310,9 @@ class Items {
|
|
|
21310
21310
|
item.render(context);
|
|
21311
21311
|
}
|
|
21312
21312
|
});
|
|
21313
|
+
items.forEach((item) => {
|
|
21314
|
+
item.renderHoverHighlight(context);
|
|
21315
|
+
});
|
|
21313
21316
|
}
|
|
21314
21317
|
renderHTML(documentFactory) {
|
|
21315
21318
|
const items = this.getItemsInView();
|
|
@@ -21576,6 +21579,8 @@ class BaseItem extends Mbr {
|
|
|
21576
21579
|
onlyProportionalResize = false;
|
|
21577
21580
|
itemType = "";
|
|
21578
21581
|
children = [];
|
|
21582
|
+
isHoverHighlighted = false;
|
|
21583
|
+
static HOVER_HIGHLIGHT_COLOR = "rgba(71, 120, 245, 0.7)";
|
|
21579
21584
|
constructor(board, id = "", defaultItemData, isGroupItem) {
|
|
21580
21585
|
super();
|
|
21581
21586
|
this.defaultItemData = defaultItemData;
|
|
@@ -21863,6 +21868,23 @@ class BaseItem extends Mbr {
|
|
|
21863
21868
|
getPath() {
|
|
21864
21869
|
return new Path(this.getMbr().getLines(), true);
|
|
21865
21870
|
}
|
|
21871
|
+
highlightMbr() {
|
|
21872
|
+
this.isHoverHighlighted = true;
|
|
21873
|
+
this.subject.publish(this);
|
|
21874
|
+
}
|
|
21875
|
+
clearHighlightMbr() {
|
|
21876
|
+
this.isHoverHighlighted = false;
|
|
21877
|
+
this.subject.publish(this);
|
|
21878
|
+
}
|
|
21879
|
+
renderHoverHighlight(context) {
|
|
21880
|
+
if (!this.isHoverHighlighted) {
|
|
21881
|
+
return;
|
|
21882
|
+
}
|
|
21883
|
+
const mbr = this.getMbr();
|
|
21884
|
+
mbr.strokeWidth = 2 / context.matrix.scaleX;
|
|
21885
|
+
mbr.borderColor = BaseItem.HOVER_HIGHLIGHT_COLOR;
|
|
21886
|
+
mbr.render(context);
|
|
21887
|
+
}
|
|
21866
21888
|
render(context) {
|
|
21867
21889
|
if (this.index) {
|
|
21868
21890
|
this.index.render(context);
|
package/dist/cjs/node.js
CHANGED
|
@@ -23782,6 +23782,9 @@ class Items {
|
|
|
23782
23782
|
item.render(context);
|
|
23783
23783
|
}
|
|
23784
23784
|
});
|
|
23785
|
+
items.forEach((item) => {
|
|
23786
|
+
item.renderHoverHighlight(context);
|
|
23787
|
+
});
|
|
23785
23788
|
}
|
|
23786
23789
|
renderHTML(documentFactory) {
|
|
23787
23790
|
const items = this.getItemsInView();
|
|
@@ -24048,6 +24051,8 @@ class BaseItem extends Mbr {
|
|
|
24048
24051
|
onlyProportionalResize = false;
|
|
24049
24052
|
itemType = "";
|
|
24050
24053
|
children = [];
|
|
24054
|
+
isHoverHighlighted = false;
|
|
24055
|
+
static HOVER_HIGHLIGHT_COLOR = "rgba(71, 120, 245, 0.7)";
|
|
24051
24056
|
constructor(board, id = "", defaultItemData, isGroupItem) {
|
|
24052
24057
|
super();
|
|
24053
24058
|
this.defaultItemData = defaultItemData;
|
|
@@ -24335,6 +24340,23 @@ class BaseItem extends Mbr {
|
|
|
24335
24340
|
getPath() {
|
|
24336
24341
|
return new Path(this.getMbr().getLines(), true);
|
|
24337
24342
|
}
|
|
24343
|
+
highlightMbr() {
|
|
24344
|
+
this.isHoverHighlighted = true;
|
|
24345
|
+
this.subject.publish(this);
|
|
24346
|
+
}
|
|
24347
|
+
clearHighlightMbr() {
|
|
24348
|
+
this.isHoverHighlighted = false;
|
|
24349
|
+
this.subject.publish(this);
|
|
24350
|
+
}
|
|
24351
|
+
renderHoverHighlight(context) {
|
|
24352
|
+
if (!this.isHoverHighlighted) {
|
|
24353
|
+
return;
|
|
24354
|
+
}
|
|
24355
|
+
const mbr = this.getMbr();
|
|
24356
|
+
mbr.strokeWidth = 2 / context.matrix.scaleX;
|
|
24357
|
+
mbr.borderColor = BaseItem.HOVER_HIGHLIGHT_COLOR;
|
|
24358
|
+
mbr.render(context);
|
|
24359
|
+
}
|
|
24338
24360
|
render(context) {
|
|
24339
24361
|
if (this.index) {
|
|
24340
24362
|
this.index.render(context);
|
package/dist/esm/browser.js
CHANGED
|
@@ -21153,6 +21153,9 @@ class Items {
|
|
|
21153
21153
|
item.render(context);
|
|
21154
21154
|
}
|
|
21155
21155
|
});
|
|
21156
|
+
items.forEach((item) => {
|
|
21157
|
+
item.renderHoverHighlight(context);
|
|
21158
|
+
});
|
|
21156
21159
|
}
|
|
21157
21160
|
renderHTML(documentFactory) {
|
|
21158
21161
|
const items = this.getItemsInView();
|
|
@@ -21419,6 +21422,8 @@ class BaseItem extends Mbr {
|
|
|
21419
21422
|
onlyProportionalResize = false;
|
|
21420
21423
|
itemType = "";
|
|
21421
21424
|
children = [];
|
|
21425
|
+
isHoverHighlighted = false;
|
|
21426
|
+
static HOVER_HIGHLIGHT_COLOR = "rgba(71, 120, 245, 0.7)";
|
|
21422
21427
|
constructor(board, id = "", defaultItemData, isGroupItem) {
|
|
21423
21428
|
super();
|
|
21424
21429
|
this.defaultItemData = defaultItemData;
|
|
@@ -21706,6 +21711,23 @@ class BaseItem extends Mbr {
|
|
|
21706
21711
|
getPath() {
|
|
21707
21712
|
return new Path(this.getMbr().getLines(), true);
|
|
21708
21713
|
}
|
|
21714
|
+
highlightMbr() {
|
|
21715
|
+
this.isHoverHighlighted = true;
|
|
21716
|
+
this.subject.publish(this);
|
|
21717
|
+
}
|
|
21718
|
+
clearHighlightMbr() {
|
|
21719
|
+
this.isHoverHighlighted = false;
|
|
21720
|
+
this.subject.publish(this);
|
|
21721
|
+
}
|
|
21722
|
+
renderHoverHighlight(context) {
|
|
21723
|
+
if (!this.isHoverHighlighted) {
|
|
21724
|
+
return;
|
|
21725
|
+
}
|
|
21726
|
+
const mbr = this.getMbr();
|
|
21727
|
+
mbr.strokeWidth = 2 / context.matrix.scaleX;
|
|
21728
|
+
mbr.borderColor = BaseItem.HOVER_HIGHLIGHT_COLOR;
|
|
21729
|
+
mbr.render(context);
|
|
21730
|
+
}
|
|
21709
21731
|
render(context) {
|
|
21710
21732
|
if (this.index) {
|
|
21711
21733
|
this.index.render(context);
|
package/dist/esm/index.js
CHANGED
|
@@ -21146,6 +21146,9 @@ class Items {
|
|
|
21146
21146
|
item.render(context);
|
|
21147
21147
|
}
|
|
21148
21148
|
});
|
|
21149
|
+
items.forEach((item) => {
|
|
21150
|
+
item.renderHoverHighlight(context);
|
|
21151
|
+
});
|
|
21149
21152
|
}
|
|
21150
21153
|
renderHTML(documentFactory) {
|
|
21151
21154
|
const items = this.getItemsInView();
|
|
@@ -21412,6 +21415,8 @@ class BaseItem extends Mbr {
|
|
|
21412
21415
|
onlyProportionalResize = false;
|
|
21413
21416
|
itemType = "";
|
|
21414
21417
|
children = [];
|
|
21418
|
+
isHoverHighlighted = false;
|
|
21419
|
+
static HOVER_HIGHLIGHT_COLOR = "rgba(71, 120, 245, 0.7)";
|
|
21415
21420
|
constructor(board, id = "", defaultItemData, isGroupItem) {
|
|
21416
21421
|
super();
|
|
21417
21422
|
this.defaultItemData = defaultItemData;
|
|
@@ -21699,6 +21704,23 @@ class BaseItem extends Mbr {
|
|
|
21699
21704
|
getPath() {
|
|
21700
21705
|
return new Path(this.getMbr().getLines(), true);
|
|
21701
21706
|
}
|
|
21707
|
+
highlightMbr() {
|
|
21708
|
+
this.isHoverHighlighted = true;
|
|
21709
|
+
this.subject.publish(this);
|
|
21710
|
+
}
|
|
21711
|
+
clearHighlightMbr() {
|
|
21712
|
+
this.isHoverHighlighted = false;
|
|
21713
|
+
this.subject.publish(this);
|
|
21714
|
+
}
|
|
21715
|
+
renderHoverHighlight(context) {
|
|
21716
|
+
if (!this.isHoverHighlighted) {
|
|
21717
|
+
return;
|
|
21718
|
+
}
|
|
21719
|
+
const mbr = this.getMbr();
|
|
21720
|
+
mbr.strokeWidth = 2 / context.matrix.scaleX;
|
|
21721
|
+
mbr.borderColor = BaseItem.HOVER_HIGHLIGHT_COLOR;
|
|
21722
|
+
mbr.render(context);
|
|
21723
|
+
}
|
|
21702
21724
|
render(context) {
|
|
21703
21725
|
if (this.index) {
|
|
21704
21726
|
this.index.render(context);
|
package/dist/esm/node.js
CHANGED
|
@@ -23613,6 +23613,9 @@ class Items {
|
|
|
23613
23613
|
item.render(context);
|
|
23614
23614
|
}
|
|
23615
23615
|
});
|
|
23616
|
+
items.forEach((item) => {
|
|
23617
|
+
item.renderHoverHighlight(context);
|
|
23618
|
+
});
|
|
23616
23619
|
}
|
|
23617
23620
|
renderHTML(documentFactory) {
|
|
23618
23621
|
const items = this.getItemsInView();
|
|
@@ -23879,6 +23882,8 @@ class BaseItem extends Mbr {
|
|
|
23879
23882
|
onlyProportionalResize = false;
|
|
23880
23883
|
itemType = "";
|
|
23881
23884
|
children = [];
|
|
23885
|
+
isHoverHighlighted = false;
|
|
23886
|
+
static HOVER_HIGHLIGHT_COLOR = "rgba(71, 120, 245, 0.7)";
|
|
23882
23887
|
constructor(board, id = "", defaultItemData, isGroupItem) {
|
|
23883
23888
|
super();
|
|
23884
23889
|
this.defaultItemData = defaultItemData;
|
|
@@ -24166,6 +24171,23 @@ class BaseItem extends Mbr {
|
|
|
24166
24171
|
getPath() {
|
|
24167
24172
|
return new Path(this.getMbr().getLines(), true);
|
|
24168
24173
|
}
|
|
24174
|
+
highlightMbr() {
|
|
24175
|
+
this.isHoverHighlighted = true;
|
|
24176
|
+
this.subject.publish(this);
|
|
24177
|
+
}
|
|
24178
|
+
clearHighlightMbr() {
|
|
24179
|
+
this.isHoverHighlighted = false;
|
|
24180
|
+
this.subject.publish(this);
|
|
24181
|
+
}
|
|
24182
|
+
renderHoverHighlight(context) {
|
|
24183
|
+
if (!this.isHoverHighlighted) {
|
|
24184
|
+
return;
|
|
24185
|
+
}
|
|
24186
|
+
const mbr = this.getMbr();
|
|
24187
|
+
mbr.strokeWidth = 2 / context.matrix.scaleX;
|
|
24188
|
+
mbr.borderColor = BaseItem.HOVER_HIGHLIGHT_COLOR;
|
|
24189
|
+
mbr.render(context);
|
|
24190
|
+
}
|
|
24169
24191
|
render(context) {
|
|
24170
24192
|
if (this.index) {
|
|
24171
24193
|
this.index.render(context);
|
|
@@ -41,6 +41,8 @@ export declare class BaseItem extends Mbr implements Geometry {
|
|
|
41
41
|
onlyProportionalResize: boolean;
|
|
42
42
|
itemType: string;
|
|
43
43
|
children: string[];
|
|
44
|
+
isHoverHighlighted: boolean;
|
|
45
|
+
static readonly HOVER_HIGHLIGHT_COLOR = "rgba(71, 120, 245, 0.7)";
|
|
44
46
|
constructor(board: Board, id?: string, defaultItemData?: BaseItemData | undefined, isGroupItem?: boolean);
|
|
45
47
|
updateChildrenIds(): void;
|
|
46
48
|
getId(): string;
|
|
@@ -77,6 +79,9 @@ export declare class BaseItem extends Mbr implements Geometry {
|
|
|
77
79
|
isEnclosedOrCrossedBy(rect: Mbr): boolean;
|
|
78
80
|
getMbrWithChildren(): Mbr;
|
|
79
81
|
getPath(): Path | Paths;
|
|
82
|
+
highlightMbr(): void;
|
|
83
|
+
clearHighlightMbr(): void;
|
|
84
|
+
renderHoverHighlight(context: DrawingContext): void;
|
|
80
85
|
render(context: DrawingContext): void;
|
|
81
86
|
renderHTML(documentFactory: DocumentFactory): HTMLElement;
|
|
82
87
|
}
|