microboard-temp 0.4.92 → 0.4.94
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 +8 -8
- package/dist/cjs/index.js +8 -8
- package/dist/cjs/node.js +8 -8
- package/dist/esm/browser.js +8 -8
- package/dist/esm/index.js +8 -8
- package/dist/esm/node.js +8 -8
- package/dist/types/Items/Examples/CardGame/Card/Card.d.ts +1 -1
- package/dist/types/Settings.d.ts +0 -2
- package/package.json +1 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -7064,9 +7064,7 @@ var conf = {
|
|
|
7064
7064
|
FORCE_HOTKEYS: "auto",
|
|
7065
7065
|
debug: false,
|
|
7066
7066
|
FALLBACK_LNG: "en",
|
|
7067
|
-
cursorsMap
|
|
7068
|
-
apiURL: undefined,
|
|
7069
|
-
wsURL: undefined
|
|
7067
|
+
cursorsMap
|
|
7070
7068
|
};
|
|
7071
7069
|
initDefaultI18N();
|
|
7072
7070
|
|
|
@@ -47837,7 +47835,7 @@ class Card extends BaseItem {
|
|
|
47837
47835
|
this.board.bringToFront(this);
|
|
47838
47836
|
}, 1000);
|
|
47839
47837
|
this.transformation.subject.subscribe((_, op) => {
|
|
47840
|
-
if (this.parent === "Board" && op.method === "translateBy"
|
|
47838
|
+
if (this.parent === "Board" && op.method === "translateBy") {
|
|
47841
47839
|
this.throttledBringToFront();
|
|
47842
47840
|
}
|
|
47843
47841
|
this.updateMbr();
|
|
@@ -47864,14 +47862,14 @@ class Card extends BaseItem {
|
|
|
47864
47862
|
this.imageToRender = this.face;
|
|
47865
47863
|
}
|
|
47866
47864
|
}
|
|
47867
|
-
render(context) {
|
|
47865
|
+
render(context, left) {
|
|
47868
47866
|
if (this.transformationRenderBlock) {
|
|
47869
47867
|
return;
|
|
47870
47868
|
}
|
|
47871
47869
|
const ctx = context.ctx;
|
|
47872
47870
|
if (this.imageToRender && this.imageToRender.complete) {
|
|
47873
47871
|
ctx.save();
|
|
47874
|
-
ctx.drawImage(this.imageToRender, this.left, this.top, CARD_DIMENSIONS.width, CARD_DIMENSIONS.height);
|
|
47872
|
+
ctx.drawImage(this.imageToRender, left ? left : this.left, this.top, CARD_DIMENSIONS.width, CARD_DIMENSIONS.height);
|
|
47875
47873
|
ctx.restore();
|
|
47876
47874
|
}
|
|
47877
47875
|
}
|
|
@@ -48068,14 +48066,16 @@ class Deck extends BaseItem {
|
|
|
48068
48066
|
if (!width2 || !height3) {
|
|
48069
48067
|
return;
|
|
48070
48068
|
}
|
|
48071
|
-
const tempCanvas =
|
|
48069
|
+
const tempCanvas = conf.documentFactory.createElement("canvas");
|
|
48072
48070
|
tempCanvas.width = width2;
|
|
48073
48071
|
tempCanvas.height = height3;
|
|
48074
48072
|
const tempCtx = tempCanvas.getContext("2d");
|
|
48075
48073
|
if (!tempCtx)
|
|
48076
48074
|
return;
|
|
48077
48075
|
const tempContext = { ...context, ctx: tempCtx };
|
|
48078
|
-
this.index?.
|
|
48076
|
+
this.index?.list().forEach((item, index2) => {
|
|
48077
|
+
item.render(tempContext, index2 * 2);
|
|
48078
|
+
});
|
|
48079
48079
|
this.cachedCanvas = tempCanvas;
|
|
48080
48080
|
}
|
|
48081
48081
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -7064,9 +7064,7 @@ var conf = {
|
|
|
7064
7064
|
FORCE_HOTKEYS: "auto",
|
|
7065
7065
|
debug: false,
|
|
7066
7066
|
FALLBACK_LNG: "en",
|
|
7067
|
-
cursorsMap
|
|
7068
|
-
apiURL: undefined,
|
|
7069
|
-
wsURL: undefined
|
|
7067
|
+
cursorsMap
|
|
7070
7068
|
};
|
|
7071
7069
|
initDefaultI18N();
|
|
7072
7070
|
|
|
@@ -47837,7 +47835,7 @@ class Card extends BaseItem {
|
|
|
47837
47835
|
this.board.bringToFront(this);
|
|
47838
47836
|
}, 1000);
|
|
47839
47837
|
this.transformation.subject.subscribe((_, op) => {
|
|
47840
|
-
if (this.parent === "Board" && op.method === "translateBy"
|
|
47838
|
+
if (this.parent === "Board" && op.method === "translateBy") {
|
|
47841
47839
|
this.throttledBringToFront();
|
|
47842
47840
|
}
|
|
47843
47841
|
this.updateMbr();
|
|
@@ -47864,14 +47862,14 @@ class Card extends BaseItem {
|
|
|
47864
47862
|
this.imageToRender = this.face;
|
|
47865
47863
|
}
|
|
47866
47864
|
}
|
|
47867
|
-
render(context) {
|
|
47865
|
+
render(context, left) {
|
|
47868
47866
|
if (this.transformationRenderBlock) {
|
|
47869
47867
|
return;
|
|
47870
47868
|
}
|
|
47871
47869
|
const ctx = context.ctx;
|
|
47872
47870
|
if (this.imageToRender && this.imageToRender.complete) {
|
|
47873
47871
|
ctx.save();
|
|
47874
|
-
ctx.drawImage(this.imageToRender, this.left, this.top, CARD_DIMENSIONS.width, CARD_DIMENSIONS.height);
|
|
47872
|
+
ctx.drawImage(this.imageToRender, left ? left : this.left, this.top, CARD_DIMENSIONS.width, CARD_DIMENSIONS.height);
|
|
47875
47873
|
ctx.restore();
|
|
47876
47874
|
}
|
|
47877
47875
|
}
|
|
@@ -48068,14 +48066,16 @@ class Deck extends BaseItem {
|
|
|
48068
48066
|
if (!width2 || !height3) {
|
|
48069
48067
|
return;
|
|
48070
48068
|
}
|
|
48071
|
-
const tempCanvas =
|
|
48069
|
+
const tempCanvas = conf.documentFactory.createElement("canvas");
|
|
48072
48070
|
tempCanvas.width = width2;
|
|
48073
48071
|
tempCanvas.height = height3;
|
|
48074
48072
|
const tempCtx = tempCanvas.getContext("2d");
|
|
48075
48073
|
if (!tempCtx)
|
|
48076
48074
|
return;
|
|
48077
48075
|
const tempContext = { ...context, ctx: tempCtx };
|
|
48078
|
-
this.index?.
|
|
48076
|
+
this.index?.list().forEach((item, index2) => {
|
|
48077
|
+
item.render(tempContext, index2 * 2);
|
|
48078
|
+
});
|
|
48079
48079
|
this.cachedCanvas = tempCanvas;
|
|
48080
48080
|
}
|
|
48081
48081
|
}
|
package/dist/cjs/node.js
CHANGED
|
@@ -8101,9 +8101,7 @@ var conf = {
|
|
|
8101
8101
|
FORCE_HOTKEYS: "auto",
|
|
8102
8102
|
debug: false,
|
|
8103
8103
|
FALLBACK_LNG: "en",
|
|
8104
|
-
cursorsMap
|
|
8105
|
-
apiURL: undefined,
|
|
8106
|
-
wsURL: undefined
|
|
8104
|
+
cursorsMap
|
|
8107
8105
|
};
|
|
8108
8106
|
initDefaultI18N();
|
|
8109
8107
|
|
|
@@ -50310,7 +50308,7 @@ class Card extends BaseItem {
|
|
|
50310
50308
|
this.board.bringToFront(this);
|
|
50311
50309
|
}, 1000);
|
|
50312
50310
|
this.transformation.subject.subscribe((_, op) => {
|
|
50313
|
-
if (this.parent === "Board" && op.method === "translateBy"
|
|
50311
|
+
if (this.parent === "Board" && op.method === "translateBy") {
|
|
50314
50312
|
this.throttledBringToFront();
|
|
50315
50313
|
}
|
|
50316
50314
|
this.updateMbr();
|
|
@@ -50337,14 +50335,14 @@ class Card extends BaseItem {
|
|
|
50337
50335
|
this.imageToRender = this.face;
|
|
50338
50336
|
}
|
|
50339
50337
|
}
|
|
50340
|
-
render(context) {
|
|
50338
|
+
render(context, left) {
|
|
50341
50339
|
if (this.transformationRenderBlock) {
|
|
50342
50340
|
return;
|
|
50343
50341
|
}
|
|
50344
50342
|
const ctx = context.ctx;
|
|
50345
50343
|
if (this.imageToRender && this.imageToRender.complete) {
|
|
50346
50344
|
ctx.save();
|
|
50347
|
-
ctx.drawImage(this.imageToRender, this.left, this.top, CARD_DIMENSIONS.width, CARD_DIMENSIONS.height);
|
|
50345
|
+
ctx.drawImage(this.imageToRender, left ? left : this.left, this.top, CARD_DIMENSIONS.width, CARD_DIMENSIONS.height);
|
|
50348
50346
|
ctx.restore();
|
|
50349
50347
|
}
|
|
50350
50348
|
}
|
|
@@ -50541,14 +50539,16 @@ class Deck extends BaseItem {
|
|
|
50541
50539
|
if (!width2 || !height3) {
|
|
50542
50540
|
return;
|
|
50543
50541
|
}
|
|
50544
|
-
const tempCanvas =
|
|
50542
|
+
const tempCanvas = conf.documentFactory.createElement("canvas");
|
|
50545
50543
|
tempCanvas.width = width2;
|
|
50546
50544
|
tempCanvas.height = height3;
|
|
50547
50545
|
const tempCtx = tempCanvas.getContext("2d");
|
|
50548
50546
|
if (!tempCtx)
|
|
50549
50547
|
return;
|
|
50550
50548
|
const tempContext = { ...context, ctx: tempCtx };
|
|
50551
|
-
this.index?.
|
|
50549
|
+
this.index?.list().forEach((item, index2) => {
|
|
50550
|
+
item.render(tempContext, index2 * 2);
|
|
50551
|
+
});
|
|
50552
50552
|
this.cachedCanvas = tempCanvas;
|
|
50553
50553
|
}
|
|
50554
50554
|
}
|
package/dist/esm/browser.js
CHANGED
|
@@ -6904,9 +6904,7 @@ var conf = {
|
|
|
6904
6904
|
FORCE_HOTKEYS: "auto",
|
|
6905
6905
|
debug: false,
|
|
6906
6906
|
FALLBACK_LNG: "en",
|
|
6907
|
-
cursorsMap
|
|
6908
|
-
apiURL: undefined,
|
|
6909
|
-
wsURL: undefined
|
|
6907
|
+
cursorsMap
|
|
6910
6908
|
};
|
|
6911
6909
|
initDefaultI18N();
|
|
6912
6910
|
|
|
@@ -47686,7 +47684,7 @@ class Card extends BaseItem {
|
|
|
47686
47684
|
this.board.bringToFront(this);
|
|
47687
47685
|
}, 1000);
|
|
47688
47686
|
this.transformation.subject.subscribe((_, op) => {
|
|
47689
|
-
if (this.parent === "Board" && op.method === "translateBy"
|
|
47687
|
+
if (this.parent === "Board" && op.method === "translateBy") {
|
|
47690
47688
|
this.throttledBringToFront();
|
|
47691
47689
|
}
|
|
47692
47690
|
this.updateMbr();
|
|
@@ -47713,14 +47711,14 @@ class Card extends BaseItem {
|
|
|
47713
47711
|
this.imageToRender = this.face;
|
|
47714
47712
|
}
|
|
47715
47713
|
}
|
|
47716
|
-
render(context) {
|
|
47714
|
+
render(context, left) {
|
|
47717
47715
|
if (this.transformationRenderBlock) {
|
|
47718
47716
|
return;
|
|
47719
47717
|
}
|
|
47720
47718
|
const ctx = context.ctx;
|
|
47721
47719
|
if (this.imageToRender && this.imageToRender.complete) {
|
|
47722
47720
|
ctx.save();
|
|
47723
|
-
ctx.drawImage(this.imageToRender, this.left, this.top, CARD_DIMENSIONS.width, CARD_DIMENSIONS.height);
|
|
47721
|
+
ctx.drawImage(this.imageToRender, left ? left : this.left, this.top, CARD_DIMENSIONS.width, CARD_DIMENSIONS.height);
|
|
47724
47722
|
ctx.restore();
|
|
47725
47723
|
}
|
|
47726
47724
|
}
|
|
@@ -47917,14 +47915,16 @@ class Deck extends BaseItem {
|
|
|
47917
47915
|
if (!width2 || !height3) {
|
|
47918
47916
|
return;
|
|
47919
47917
|
}
|
|
47920
|
-
const tempCanvas =
|
|
47918
|
+
const tempCanvas = conf.documentFactory.createElement("canvas");
|
|
47921
47919
|
tempCanvas.width = width2;
|
|
47922
47920
|
tempCanvas.height = height3;
|
|
47923
47921
|
const tempCtx = tempCanvas.getContext("2d");
|
|
47924
47922
|
if (!tempCtx)
|
|
47925
47923
|
return;
|
|
47926
47924
|
const tempContext = { ...context, ctx: tempCtx };
|
|
47927
|
-
this.index?.
|
|
47925
|
+
this.index?.list().forEach((item, index2) => {
|
|
47926
|
+
item.render(tempContext, index2 * 2);
|
|
47927
|
+
});
|
|
47928
47928
|
this.cachedCanvas = tempCanvas;
|
|
47929
47929
|
}
|
|
47930
47930
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -6897,9 +6897,7 @@ var conf = {
|
|
|
6897
6897
|
FORCE_HOTKEYS: "auto",
|
|
6898
6898
|
debug: false,
|
|
6899
6899
|
FALLBACK_LNG: "en",
|
|
6900
|
-
cursorsMap
|
|
6901
|
-
apiURL: undefined,
|
|
6902
|
-
wsURL: undefined
|
|
6900
|
+
cursorsMap
|
|
6903
6901
|
};
|
|
6904
6902
|
initDefaultI18N();
|
|
6905
6903
|
|
|
@@ -47679,7 +47677,7 @@ class Card extends BaseItem {
|
|
|
47679
47677
|
this.board.bringToFront(this);
|
|
47680
47678
|
}, 1000);
|
|
47681
47679
|
this.transformation.subject.subscribe((_, op) => {
|
|
47682
|
-
if (this.parent === "Board" && op.method === "translateBy"
|
|
47680
|
+
if (this.parent === "Board" && op.method === "translateBy") {
|
|
47683
47681
|
this.throttledBringToFront();
|
|
47684
47682
|
}
|
|
47685
47683
|
this.updateMbr();
|
|
@@ -47706,14 +47704,14 @@ class Card extends BaseItem {
|
|
|
47706
47704
|
this.imageToRender = this.face;
|
|
47707
47705
|
}
|
|
47708
47706
|
}
|
|
47709
|
-
render(context) {
|
|
47707
|
+
render(context, left) {
|
|
47710
47708
|
if (this.transformationRenderBlock) {
|
|
47711
47709
|
return;
|
|
47712
47710
|
}
|
|
47713
47711
|
const ctx = context.ctx;
|
|
47714
47712
|
if (this.imageToRender && this.imageToRender.complete) {
|
|
47715
47713
|
ctx.save();
|
|
47716
|
-
ctx.drawImage(this.imageToRender, this.left, this.top, CARD_DIMENSIONS.width, CARD_DIMENSIONS.height);
|
|
47714
|
+
ctx.drawImage(this.imageToRender, left ? left : this.left, this.top, CARD_DIMENSIONS.width, CARD_DIMENSIONS.height);
|
|
47717
47715
|
ctx.restore();
|
|
47718
47716
|
}
|
|
47719
47717
|
}
|
|
@@ -47910,14 +47908,16 @@ class Deck extends BaseItem {
|
|
|
47910
47908
|
if (!width2 || !height3) {
|
|
47911
47909
|
return;
|
|
47912
47910
|
}
|
|
47913
|
-
const tempCanvas =
|
|
47911
|
+
const tempCanvas = conf.documentFactory.createElement("canvas");
|
|
47914
47912
|
tempCanvas.width = width2;
|
|
47915
47913
|
tempCanvas.height = height3;
|
|
47916
47914
|
const tempCtx = tempCanvas.getContext("2d");
|
|
47917
47915
|
if (!tempCtx)
|
|
47918
47916
|
return;
|
|
47919
47917
|
const tempContext = { ...context, ctx: tempCtx };
|
|
47920
|
-
this.index?.
|
|
47918
|
+
this.index?.list().forEach((item, index2) => {
|
|
47919
|
+
item.render(tempContext, index2 * 2);
|
|
47920
|
+
});
|
|
47921
47921
|
this.cachedCanvas = tempCanvas;
|
|
47922
47922
|
}
|
|
47923
47923
|
}
|
package/dist/esm/node.js
CHANGED
|
@@ -7681,9 +7681,7 @@ var conf = {
|
|
|
7681
7681
|
FORCE_HOTKEYS: "auto",
|
|
7682
7682
|
debug: false,
|
|
7683
7683
|
FALLBACK_LNG: "en",
|
|
7684
|
-
cursorsMap
|
|
7685
|
-
apiURL: undefined,
|
|
7686
|
-
wsURL: undefined
|
|
7684
|
+
cursorsMap
|
|
7687
7685
|
};
|
|
7688
7686
|
initDefaultI18N();
|
|
7689
7687
|
|
|
@@ -50147,7 +50145,7 @@ class Card extends BaseItem {
|
|
|
50147
50145
|
this.board.bringToFront(this);
|
|
50148
50146
|
}, 1000);
|
|
50149
50147
|
this.transformation.subject.subscribe((_, op) => {
|
|
50150
|
-
if (this.parent === "Board" && op.method === "translateBy"
|
|
50148
|
+
if (this.parent === "Board" && op.method === "translateBy") {
|
|
50151
50149
|
this.throttledBringToFront();
|
|
50152
50150
|
}
|
|
50153
50151
|
this.updateMbr();
|
|
@@ -50174,14 +50172,14 @@ class Card extends BaseItem {
|
|
|
50174
50172
|
this.imageToRender = this.face;
|
|
50175
50173
|
}
|
|
50176
50174
|
}
|
|
50177
|
-
render(context) {
|
|
50175
|
+
render(context, left) {
|
|
50178
50176
|
if (this.transformationRenderBlock) {
|
|
50179
50177
|
return;
|
|
50180
50178
|
}
|
|
50181
50179
|
const ctx = context.ctx;
|
|
50182
50180
|
if (this.imageToRender && this.imageToRender.complete) {
|
|
50183
50181
|
ctx.save();
|
|
50184
|
-
ctx.drawImage(this.imageToRender, this.left, this.top, CARD_DIMENSIONS.width, CARD_DIMENSIONS.height);
|
|
50182
|
+
ctx.drawImage(this.imageToRender, left ? left : this.left, this.top, CARD_DIMENSIONS.width, CARD_DIMENSIONS.height);
|
|
50185
50183
|
ctx.restore();
|
|
50186
50184
|
}
|
|
50187
50185
|
}
|
|
@@ -50378,14 +50376,16 @@ class Deck extends BaseItem {
|
|
|
50378
50376
|
if (!width2 || !height3) {
|
|
50379
50377
|
return;
|
|
50380
50378
|
}
|
|
50381
|
-
const tempCanvas =
|
|
50379
|
+
const tempCanvas = conf.documentFactory.createElement("canvas");
|
|
50382
50380
|
tempCanvas.width = width2;
|
|
50383
50381
|
tempCanvas.height = height3;
|
|
50384
50382
|
const tempCtx = tempCanvas.getContext("2d");
|
|
50385
50383
|
if (!tempCtx)
|
|
50386
50384
|
return;
|
|
50387
50385
|
const tempContext = { ...context, ctx: tempCtx };
|
|
50388
|
-
this.index?.
|
|
50386
|
+
this.index?.list().forEach((item, index2) => {
|
|
50387
|
+
item.render(tempContext, index2 * 2);
|
|
50388
|
+
});
|
|
50389
50389
|
this.cachedCanvas = tempCanvas;
|
|
50390
50390
|
}
|
|
50391
50391
|
}
|
|
@@ -26,7 +26,7 @@ export declare class Card extends BaseItem {
|
|
|
26
26
|
});
|
|
27
27
|
createImages(): void;
|
|
28
28
|
updateImageToRender(): void;
|
|
29
|
-
render(context: DrawingContext): void;
|
|
29
|
+
render(context: DrawingContext, left?: number): void;
|
|
30
30
|
updateMbr(): void;
|
|
31
31
|
getPath(): Path | Paths;
|
|
32
32
|
deserialize(data: SerializedItemData): this;
|
package/dist/types/Settings.d.ts
CHANGED
|
@@ -230,8 +230,6 @@ export declare const conf: {
|
|
|
230
230
|
debug: boolean;
|
|
231
231
|
FALLBACK_LNG: string;
|
|
232
232
|
cursorsMap: Partial<Record<import("./Pointer/Cursor").CursorName, string>>;
|
|
233
|
-
apiURL: string | undefined;
|
|
234
|
-
wsURL: string | undefined;
|
|
235
233
|
};
|
|
236
234
|
export type Settings = typeof conf;
|
|
237
235
|
export {};
|