microboard-temp 0.5.42 → 0.5.44

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.
@@ -7071,7 +7071,8 @@ var conf = {
7071
7071
  DECK_HORIZONTAL_OFFSET: 2,
7072
7072
  DECK_VERTICAL_OFFSET: 2,
7073
7073
  CARD_DIMENSIONS: { width: 250, height: 400 },
7074
- DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 }
7074
+ DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 },
7075
+ MAX_CARD_SIZE: 500
7075
7076
  };
7076
7077
  initDefaultI18N();
7077
7078
 
@@ -47985,11 +47986,7 @@ class Card extends BaseItem {
47985
47986
  }
47986
47987
  ctx.translate(centerX, centerY);
47987
47988
  ctx.rotate(this.transformation.getRotation() * Math.PI / 180);
47988
- if (width2 > height3) {
47989
- ctx.drawImage(this.imageToRender, -height3 / 2, -width2 / 2, height3, width2);
47990
- } else {
47991
- ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2, width2, height3);
47992
- }
47989
+ ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2);
47993
47990
  ctx.restore();
47994
47991
  }
47995
47992
  }
package/dist/cjs/index.js CHANGED
@@ -7071,7 +7071,8 @@ var conf = {
7071
7071
  DECK_HORIZONTAL_OFFSET: 2,
7072
7072
  DECK_VERTICAL_OFFSET: 2,
7073
7073
  CARD_DIMENSIONS: { width: 250, height: 400 },
7074
- DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 }
7074
+ DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 },
7075
+ MAX_CARD_SIZE: 500
7075
7076
  };
7076
7077
  initDefaultI18N();
7077
7078
 
@@ -47985,11 +47986,7 @@ class Card extends BaseItem {
47985
47986
  }
47986
47987
  ctx.translate(centerX, centerY);
47987
47988
  ctx.rotate(this.transformation.getRotation() * Math.PI / 180);
47988
- if (width2 > height3) {
47989
- ctx.drawImage(this.imageToRender, -height3 / 2, -width2 / 2, height3, width2);
47990
- } else {
47991
- ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2, width2, height3);
47992
- }
47989
+ ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2);
47993
47990
  ctx.restore();
47994
47991
  }
47995
47992
  }
package/dist/cjs/node.js CHANGED
@@ -8108,7 +8108,8 @@ var conf = {
8108
8108
  DECK_HORIZONTAL_OFFSET: 2,
8109
8109
  DECK_VERTICAL_OFFSET: 2,
8110
8110
  CARD_DIMENSIONS: { width: 250, height: 400 },
8111
- DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 }
8111
+ DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 },
8112
+ MAX_CARD_SIZE: 500
8112
8113
  };
8113
8114
  initDefaultI18N();
8114
8115
 
@@ -50458,11 +50459,7 @@ class Card extends BaseItem {
50458
50459
  }
50459
50460
  ctx.translate(centerX, centerY);
50460
50461
  ctx.rotate(this.transformation.getRotation() * Math.PI / 180);
50461
- if (width2 > height3) {
50462
- ctx.drawImage(this.imageToRender, -height3 / 2, -width2 / 2, height3, width2);
50463
- } else {
50464
- ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2, width2, height3);
50465
- }
50462
+ ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2);
50466
50463
  ctx.restore();
50467
50464
  }
50468
50465
  }
@@ -6908,7 +6908,8 @@ var conf = {
6908
6908
  DECK_HORIZONTAL_OFFSET: 2,
6909
6909
  DECK_VERTICAL_OFFSET: 2,
6910
6910
  CARD_DIMENSIONS: { width: 250, height: 400 },
6911
- DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 }
6911
+ DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 },
6912
+ MAX_CARD_SIZE: 500
6912
6913
  };
6913
6914
  initDefaultI18N();
6914
6915
 
@@ -47831,11 +47832,7 @@ class Card extends BaseItem {
47831
47832
  }
47832
47833
  ctx.translate(centerX, centerY);
47833
47834
  ctx.rotate(this.transformation.getRotation() * Math.PI / 180);
47834
- if (width2 > height3) {
47835
- ctx.drawImage(this.imageToRender, -height3 / 2, -width2 / 2, height3, width2);
47836
- } else {
47837
- ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2, width2, height3);
47838
- }
47835
+ ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2);
47839
47836
  ctx.restore();
47840
47837
  }
47841
47838
  }
package/dist/esm/index.js CHANGED
@@ -6901,7 +6901,8 @@ var conf = {
6901
6901
  DECK_HORIZONTAL_OFFSET: 2,
6902
6902
  DECK_VERTICAL_OFFSET: 2,
6903
6903
  CARD_DIMENSIONS: { width: 250, height: 400 },
6904
- DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 }
6904
+ DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 },
6905
+ MAX_CARD_SIZE: 500
6905
6906
  };
6906
6907
  initDefaultI18N();
6907
6908
 
@@ -47824,11 +47825,7 @@ class Card extends BaseItem {
47824
47825
  }
47825
47826
  ctx.translate(centerX, centerY);
47826
47827
  ctx.rotate(this.transformation.getRotation() * Math.PI / 180);
47827
- if (width2 > height3) {
47828
- ctx.drawImage(this.imageToRender, -height3 / 2, -width2 / 2, height3, width2);
47829
- } else {
47830
- ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2, width2, height3);
47831
- }
47828
+ ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2);
47832
47829
  ctx.restore();
47833
47830
  }
47834
47831
  }
package/dist/esm/node.js CHANGED
@@ -7685,7 +7685,8 @@ var conf = {
7685
7685
  DECK_HORIZONTAL_OFFSET: 2,
7686
7686
  DECK_VERTICAL_OFFSET: 2,
7687
7687
  CARD_DIMENSIONS: { width: 250, height: 400 },
7688
- DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 }
7688
+ DEFAULT_GAME_ITEM_DIMENSIONS: { width: 200, height: 200 },
7689
+ MAX_CARD_SIZE: 500
7689
7690
  };
7690
7691
  initDefaultI18N();
7691
7692
 
@@ -50292,11 +50293,7 @@ class Card extends BaseItem {
50292
50293
  }
50293
50294
  ctx.translate(centerX, centerY);
50294
50295
  ctx.rotate(this.transformation.getRotation() * Math.PI / 180);
50295
- if (width2 > height3) {
50296
- ctx.drawImage(this.imageToRender, -height3 / 2, -width2 / 2, height3, width2);
50297
- } else {
50298
- ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2, width2, height3);
50299
- }
50296
+ ctx.drawImage(this.imageToRender, -width2 / 2, -height3 / 2);
50300
50297
  ctx.restore();
50301
50298
  }
50302
50299
  }
@@ -240,6 +240,7 @@ export declare const conf: {
240
240
  width: number;
241
241
  height: number;
242
242
  };
243
+ MAX_CARD_SIZE: number;
243
244
  };
244
245
  export type Settings = typeof conf;
245
246
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "microboard-temp",
3
- "version": "0.5.42",
3
+ "version": "0.5.44",
4
4
  "description": "A flexible interactive whiteboard library",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",