Closed FredrikNoren closed 2 months ago
Ok I found a fix: by setting dpr to 1 the size becomes correct. An alternative solution is to create a css class with canvas { width: 100%, height: 100% }
Ok I think this may have been due to some hacky ways the iframe was set up, just using it "normally" in the iframe seems to work too.
This is a bit strange and I'm not sure what's going on here: the Canvas is for some reason exactly 2x the size of the container div. When I resize the window it resizes the canvas, but still 2x. If I getBoundingClientRect on the container it confirms that the size is correct.
I assume this is some kind of dpi setting, but I can't find exactly where the problem is.
This is also running in an iframe.