fix(refboard): dot grid behind canvas, paste at native size

- Make PixiJS canvas background transparent so SVG dot grid shows through
- Move dot grid SVG before canvas in DOM with zIndex 0 (behind images)
- Set wrapper div background to #1e1e1e
- Remove 600px cap on pasted images — preserve native dimensions
This commit is contained in:
Hiren Kangad
2026-03-10 10:40:27 +05:30
parent 2b708f50c6
commit a2eea8f22f
3 changed files with 15 additions and 19 deletions
+3 -7
View File
@@ -169,13 +169,9 @@ export async function pasteFromSystemClipboard(
const assetKey = imgData.asset_key;
const w = imgData.width || 400;
const h = imgData.height || 300;
const maxDim = 600;
let fw = w, fh = h;
if (w > maxDim || h > maxDim) {
const s = maxDim / Math.max(w, h);
fw = Math.round(w * s);
fh = Math.round(h * s);
}
// Display at native size — let user resize manually if needed
const fw = w;
const fh = h;
if (assetKey) {
const center = viewport.center;
scene.addImageFromUpload(assetKey, fw, fh, center.x - fw / 2, center.y - fh / 2);