From 9a6b264b3e73d44b7d1056355deeee461be1a209 Mon Sep 17 00:00:00 2001 From: lordlogo2002 Date: Sun, 24 Aug 2025 10:12:16 +0200 Subject: [PATCH] fix: update version to 1.3.11 in package.json and package-lock.json; adjust canvas dimensions in RickGamePanel for responsive design --- source/package-lock.json | 4 ++-- source/package.json | 2 +- source/src/index.tsx | 10 +++++++++- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/source/package-lock.json b/source/package-lock.json index 9877897..8226917 100644 --- a/source/package-lock.json +++ b/source/package-lock.json @@ -1,12 +1,12 @@ { "name": "@funky-flask-test/funky-flask-test", - "version": "1.3.10", + "version": "1.3.11", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@funky-flask-test/funky-flask-test", - "version": "1.3.10", + "version": "1.3.11", "devDependencies": { "@types/node": "^24.0.15", "typescript": "^5.8.3", diff --git a/source/package.json b/source/package.json index e69e205..6bf5443 100644 --- a/source/package.json +++ b/source/package.json @@ -1,6 +1,6 @@ { "name": "@funky-flask-test/funky-flask-test", - "version": "1.3.10", + "version": "1.3.11", "type": "module", "main": "./dist/index.jsx", "exports": { diff --git a/source/src/index.tsx b/source/src/index.tsx index eaadba0..d04cb44 100644 --- a/source/src/index.tsx +++ b/source/src/index.tsx @@ -29,8 +29,16 @@ export class RickGamePanel { private createUI() { const panel = document.createElement('div') this.canvas = document.createElement('canvas') - this.canvas.style.cssText = `width: 100%; border: 2px solid #333; background: #000; cursor: pointer;` + this.canvas.style.cssText = `border: 2px solid #333; background: #000; cursor: pointer;` panel.appendChild(this.canvas) + + // Wait for panel to be in DOM to get computed size + requestAnimationFrame(() => { + const rect = panel.getBoundingClientRect() + this.canvas.width = rect.width + this.canvas.height = rect.height + }) + this.container.appendChild(panel) }