microboard-temp 0.4.93 → 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
CHANGED
|
@@ -47835,7 +47835,7 @@ class Card extends BaseItem {
|
|
|
47835
47835
|
this.board.bringToFront(this);
|
|
47836
47836
|
}, 1000);
|
|
47837
47837
|
this.transformation.subject.subscribe((_, op) => {
|
|
47838
|
-
if (this.parent === "Board" && op.method === "translateBy"
|
|
47838
|
+
if (this.parent === "Board" && op.method === "translateBy") {
|
|
47839
47839
|
this.throttledBringToFront();
|
|
47840
47840
|
}
|
|
47841
47841
|
this.updateMbr();
|
|
@@ -47862,14 +47862,14 @@ class Card extends BaseItem {
|
|
|
47862
47862
|
this.imageToRender = this.face;
|
|
47863
47863
|
}
|
|
47864
47864
|
}
|
|
47865
|
-
render(context) {
|
|
47865
|
+
render(context, left) {
|
|
47866
47866
|
if (this.transformationRenderBlock) {
|
|
47867
47867
|
return;
|
|
47868
47868
|
}
|
|
47869
47869
|
const ctx = context.ctx;
|
|
47870
47870
|
if (this.imageToRender && this.imageToRender.complete) {
|
|
47871
47871
|
ctx.save();
|
|
47872
|
-
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);
|
|
47873
47873
|
ctx.restore();
|
|
47874
47874
|
}
|
|
47875
47875
|
}
|
|
@@ -48066,14 +48066,16 @@ class Deck extends BaseItem {
|
|
|
48066
48066
|
if (!width2 || !height3) {
|
|
48067
48067
|
return;
|
|
48068
48068
|
}
|
|
48069
|
-
const tempCanvas =
|
|
48069
|
+
const tempCanvas = conf.documentFactory.createElement("canvas");
|
|
48070
48070
|
tempCanvas.width = width2;
|
|
48071
48071
|
tempCanvas.height = height3;
|
|
48072
48072
|
const tempCtx = tempCanvas.getContext("2d");
|
|
48073
48073
|
if (!tempCtx)
|
|
48074
48074
|
return;
|
|
48075
48075
|
const tempContext = { ...context, ctx: tempCtx };
|
|
48076
|
-
this.index?.
|
|
48076
|
+
this.index?.list().forEach((item, index2) => {
|
|
48077
|
+
item.render(tempContext, index2 * 2);
|
|
48078
|
+
});
|
|
48077
48079
|
this.cachedCanvas = tempCanvas;
|
|
48078
48080
|
}
|
|
48079
48081
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -47835,7 +47835,7 @@ class Card extends BaseItem {
|
|
|
47835
47835
|
this.board.bringToFront(this);
|
|
47836
47836
|
}, 1000);
|
|
47837
47837
|
this.transformation.subject.subscribe((_, op) => {
|
|
47838
|
-
if (this.parent === "Board" && op.method === "translateBy"
|
|
47838
|
+
if (this.parent === "Board" && op.method === "translateBy") {
|
|
47839
47839
|
this.throttledBringToFront();
|
|
47840
47840
|
}
|
|
47841
47841
|
this.updateMbr();
|
|
@@ -47862,14 +47862,14 @@ class Card extends BaseItem {
|
|
|
47862
47862
|
this.imageToRender = this.face;
|
|
47863
47863
|
}
|
|
47864
47864
|
}
|
|
47865
|
-
render(context) {
|
|
47865
|
+
render(context, left) {
|
|
47866
47866
|
if (this.transformationRenderBlock) {
|
|
47867
47867
|
return;
|
|
47868
47868
|
}
|
|
47869
47869
|
const ctx = context.ctx;
|
|
47870
47870
|
if (this.imageToRender && this.imageToRender.complete) {
|
|
47871
47871
|
ctx.save();
|
|
47872
|
-
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);
|
|
47873
47873
|
ctx.restore();
|
|
47874
47874
|
}
|
|
47875
47875
|
}
|
|
@@ -48066,14 +48066,16 @@ class Deck extends BaseItem {
|
|
|
48066
48066
|
if (!width2 || !height3) {
|
|
48067
48067
|
return;
|
|
48068
48068
|
}
|
|
48069
|
-
const tempCanvas =
|
|
48069
|
+
const tempCanvas = conf.documentFactory.createElement("canvas");
|
|
48070
48070
|
tempCanvas.width = width2;
|
|
48071
48071
|
tempCanvas.height = height3;
|
|
48072
48072
|
const tempCtx = tempCanvas.getContext("2d");
|
|
48073
48073
|
if (!tempCtx)
|
|
48074
48074
|
return;
|
|
48075
48075
|
const tempContext = { ...context, ctx: tempCtx };
|
|
48076
|
-
this.index?.
|
|
48076
|
+
this.index?.list().forEach((item, index2) => {
|
|
48077
|
+
item.render(tempContext, index2 * 2);
|
|
48078
|
+
});
|
|
48077
48079
|
this.cachedCanvas = tempCanvas;
|
|
48078
48080
|
}
|
|
48079
48081
|
}
|
package/dist/cjs/node.js
CHANGED
|
@@ -50308,7 +50308,7 @@ class Card extends BaseItem {
|
|
|
50308
50308
|
this.board.bringToFront(this);
|
|
50309
50309
|
}, 1000);
|
|
50310
50310
|
this.transformation.subject.subscribe((_, op) => {
|
|
50311
|
-
if (this.parent === "Board" && op.method === "translateBy"
|
|
50311
|
+
if (this.parent === "Board" && op.method === "translateBy") {
|
|
50312
50312
|
this.throttledBringToFront();
|
|
50313
50313
|
}
|
|
50314
50314
|
this.updateMbr();
|
|
@@ -50335,14 +50335,14 @@ class Card extends BaseItem {
|
|
|
50335
50335
|
this.imageToRender = this.face;
|
|
50336
50336
|
}
|
|
50337
50337
|
}
|
|
50338
|
-
render(context) {
|
|
50338
|
+
render(context, left) {
|
|
50339
50339
|
if (this.transformationRenderBlock) {
|
|
50340
50340
|
return;
|
|
50341
50341
|
}
|
|
50342
50342
|
const ctx = context.ctx;
|
|
50343
50343
|
if (this.imageToRender && this.imageToRender.complete) {
|
|
50344
50344
|
ctx.save();
|
|
50345
|
-
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);
|
|
50346
50346
|
ctx.restore();
|
|
50347
50347
|
}
|
|
50348
50348
|
}
|
|
@@ -50539,14 +50539,16 @@ class Deck extends BaseItem {
|
|
|
50539
50539
|
if (!width2 || !height3) {
|
|
50540
50540
|
return;
|
|
50541
50541
|
}
|
|
50542
|
-
const tempCanvas =
|
|
50542
|
+
const tempCanvas = conf.documentFactory.createElement("canvas");
|
|
50543
50543
|
tempCanvas.width = width2;
|
|
50544
50544
|
tempCanvas.height = height3;
|
|
50545
50545
|
const tempCtx = tempCanvas.getContext("2d");
|
|
50546
50546
|
if (!tempCtx)
|
|
50547
50547
|
return;
|
|
50548
50548
|
const tempContext = { ...context, ctx: tempCtx };
|
|
50549
|
-
this.index?.
|
|
50549
|
+
this.index?.list().forEach((item, index2) => {
|
|
50550
|
+
item.render(tempContext, index2 * 2);
|
|
50551
|
+
});
|
|
50550
50552
|
this.cachedCanvas = tempCanvas;
|
|
50551
50553
|
}
|
|
50552
50554
|
}
|
package/dist/esm/browser.js
CHANGED
|
@@ -47684,7 +47684,7 @@ class Card extends BaseItem {
|
|
|
47684
47684
|
this.board.bringToFront(this);
|
|
47685
47685
|
}, 1000);
|
|
47686
47686
|
this.transformation.subject.subscribe((_, op) => {
|
|
47687
|
-
if (this.parent === "Board" && op.method === "translateBy"
|
|
47687
|
+
if (this.parent === "Board" && op.method === "translateBy") {
|
|
47688
47688
|
this.throttledBringToFront();
|
|
47689
47689
|
}
|
|
47690
47690
|
this.updateMbr();
|
|
@@ -47711,14 +47711,14 @@ class Card extends BaseItem {
|
|
|
47711
47711
|
this.imageToRender = this.face;
|
|
47712
47712
|
}
|
|
47713
47713
|
}
|
|
47714
|
-
render(context) {
|
|
47714
|
+
render(context, left) {
|
|
47715
47715
|
if (this.transformationRenderBlock) {
|
|
47716
47716
|
return;
|
|
47717
47717
|
}
|
|
47718
47718
|
const ctx = context.ctx;
|
|
47719
47719
|
if (this.imageToRender && this.imageToRender.complete) {
|
|
47720
47720
|
ctx.save();
|
|
47721
|
-
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);
|
|
47722
47722
|
ctx.restore();
|
|
47723
47723
|
}
|
|
47724
47724
|
}
|
|
@@ -47915,14 +47915,16 @@ class Deck extends BaseItem {
|
|
|
47915
47915
|
if (!width2 || !height3) {
|
|
47916
47916
|
return;
|
|
47917
47917
|
}
|
|
47918
|
-
const tempCanvas =
|
|
47918
|
+
const tempCanvas = conf.documentFactory.createElement("canvas");
|
|
47919
47919
|
tempCanvas.width = width2;
|
|
47920
47920
|
tempCanvas.height = height3;
|
|
47921
47921
|
const tempCtx = tempCanvas.getContext("2d");
|
|
47922
47922
|
if (!tempCtx)
|
|
47923
47923
|
return;
|
|
47924
47924
|
const tempContext = { ...context, ctx: tempCtx };
|
|
47925
|
-
this.index?.
|
|
47925
|
+
this.index?.list().forEach((item, index2) => {
|
|
47926
|
+
item.render(tempContext, index2 * 2);
|
|
47927
|
+
});
|
|
47926
47928
|
this.cachedCanvas = tempCanvas;
|
|
47927
47929
|
}
|
|
47928
47930
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -47677,7 +47677,7 @@ class Card extends BaseItem {
|
|
|
47677
47677
|
this.board.bringToFront(this);
|
|
47678
47678
|
}, 1000);
|
|
47679
47679
|
this.transformation.subject.subscribe((_, op) => {
|
|
47680
|
-
if (this.parent === "Board" && op.method === "translateBy"
|
|
47680
|
+
if (this.parent === "Board" && op.method === "translateBy") {
|
|
47681
47681
|
this.throttledBringToFront();
|
|
47682
47682
|
}
|
|
47683
47683
|
this.updateMbr();
|
|
@@ -47704,14 +47704,14 @@ class Card extends BaseItem {
|
|
|
47704
47704
|
this.imageToRender = this.face;
|
|
47705
47705
|
}
|
|
47706
47706
|
}
|
|
47707
|
-
render(context) {
|
|
47707
|
+
render(context, left) {
|
|
47708
47708
|
if (this.transformationRenderBlock) {
|
|
47709
47709
|
return;
|
|
47710
47710
|
}
|
|
47711
47711
|
const ctx = context.ctx;
|
|
47712
47712
|
if (this.imageToRender && this.imageToRender.complete) {
|
|
47713
47713
|
ctx.save();
|
|
47714
|
-
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);
|
|
47715
47715
|
ctx.restore();
|
|
47716
47716
|
}
|
|
47717
47717
|
}
|
|
@@ -47908,14 +47908,16 @@ class Deck extends BaseItem {
|
|
|
47908
47908
|
if (!width2 || !height3) {
|
|
47909
47909
|
return;
|
|
47910
47910
|
}
|
|
47911
|
-
const tempCanvas =
|
|
47911
|
+
const tempCanvas = conf.documentFactory.createElement("canvas");
|
|
47912
47912
|
tempCanvas.width = width2;
|
|
47913
47913
|
tempCanvas.height = height3;
|
|
47914
47914
|
const tempCtx = tempCanvas.getContext("2d");
|
|
47915
47915
|
if (!tempCtx)
|
|
47916
47916
|
return;
|
|
47917
47917
|
const tempContext = { ...context, ctx: tempCtx };
|
|
47918
|
-
this.index?.
|
|
47918
|
+
this.index?.list().forEach((item, index2) => {
|
|
47919
|
+
item.render(tempContext, index2 * 2);
|
|
47920
|
+
});
|
|
47919
47921
|
this.cachedCanvas = tempCanvas;
|
|
47920
47922
|
}
|
|
47921
47923
|
}
|
package/dist/esm/node.js
CHANGED
|
@@ -50145,7 +50145,7 @@ class Card extends BaseItem {
|
|
|
50145
50145
|
this.board.bringToFront(this);
|
|
50146
50146
|
}, 1000);
|
|
50147
50147
|
this.transformation.subject.subscribe((_, op) => {
|
|
50148
|
-
if (this.parent === "Board" && op.method === "translateBy"
|
|
50148
|
+
if (this.parent === "Board" && op.method === "translateBy") {
|
|
50149
50149
|
this.throttledBringToFront();
|
|
50150
50150
|
}
|
|
50151
50151
|
this.updateMbr();
|
|
@@ -50172,14 +50172,14 @@ class Card extends BaseItem {
|
|
|
50172
50172
|
this.imageToRender = this.face;
|
|
50173
50173
|
}
|
|
50174
50174
|
}
|
|
50175
|
-
render(context) {
|
|
50175
|
+
render(context, left) {
|
|
50176
50176
|
if (this.transformationRenderBlock) {
|
|
50177
50177
|
return;
|
|
50178
50178
|
}
|
|
50179
50179
|
const ctx = context.ctx;
|
|
50180
50180
|
if (this.imageToRender && this.imageToRender.complete) {
|
|
50181
50181
|
ctx.save();
|
|
50182
|
-
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);
|
|
50183
50183
|
ctx.restore();
|
|
50184
50184
|
}
|
|
50185
50185
|
}
|
|
@@ -50376,14 +50376,16 @@ class Deck extends BaseItem {
|
|
|
50376
50376
|
if (!width2 || !height3) {
|
|
50377
50377
|
return;
|
|
50378
50378
|
}
|
|
50379
|
-
const tempCanvas =
|
|
50379
|
+
const tempCanvas = conf.documentFactory.createElement("canvas");
|
|
50380
50380
|
tempCanvas.width = width2;
|
|
50381
50381
|
tempCanvas.height = height3;
|
|
50382
50382
|
const tempCtx = tempCanvas.getContext("2d");
|
|
50383
50383
|
if (!tempCtx)
|
|
50384
50384
|
return;
|
|
50385
50385
|
const tempContext = { ...context, ctx: tempCtx };
|
|
50386
|
-
this.index?.
|
|
50386
|
+
this.index?.list().forEach((item, index2) => {
|
|
50387
|
+
item.render(tempContext, index2 * 2);
|
|
50388
|
+
});
|
|
50387
50389
|
this.cachedCanvas = tempCanvas;
|
|
50388
50390
|
}
|
|
50389
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;
|