@gamelearn/arcade-components 1.4.11-fix1 → 1.4.11

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.
@@ -264,21 +264,19 @@ var DragItemPuzzleComponent = function DragItemPuzzleComponent(_ref) {
264
264
  currentImage.src = imageUrl;
265
265
 
266
266
  currentImage.onload = function () {
267
- if (canvas.current) {
268
- layerConfig.current = {
269
- x: canvas.current.clientWidth / 2,
270
- y: canvas.current.clientHeight / 2,
271
- width: currentImage.width,
272
- height: currentImage.height,
273
- offsetX: currentImage.width / 2,
274
- offsetY: currentImage.height / 2,
275
- scale: {
276
- x: Math.min(canvas.current.clientWidth / currentImage.width, canvas.current.clientHeight / currentImage.height),
277
- y: Math.min(canvas.current.clientWidth / currentImage.width, canvas.current.clientHeight / currentImage.height)
278
- }
279
- };
280
- setImageLoaded(true);
281
- }
267
+ layerConfig.current = {
268
+ x: canvas.current.clientWidth / 2,
269
+ y: canvas.current.clientHeight / 2,
270
+ width: currentImage.width,
271
+ height: currentImage.height,
272
+ offsetX: currentImage.width / 2,
273
+ offsetY: currentImage.height / 2,
274
+ scale: {
275
+ x: Math.min(canvas.current.clientWidth / currentImage.width, canvas.current.clientHeight / currentImage.height),
276
+ y: Math.min(canvas.current.clientWidth / currentImage.width, canvas.current.clientHeight / currentImage.height)
277
+ }
278
+ };
279
+ setImageLoaded(true);
282
280
  };
283
281
 
284
282
  setShowTooltip(true);
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@gamelearn/arcade-components",
3
3
  "author": "Gamelearn",
4
4
  "license": "unlicense",
5
- "version": "1.4.11-fix1",
5
+ "version": "1.4.11",
6
6
  "main": "dist/index.js",
7
7
  "files": [
8
8
  "dist",