-
Hello everyone, RDK plugin positions the canvas using window.innerHeight and window.innerWidth. However, when I scale the window using resize plugin or virtual chin rest plugin, canvas origin (0,0) appears to move to the center of the screen. I've attached the shot of the result here. I followed @becky-gilbert's and @vrsivananda's solution to similar issues (here and here) and I can make the dot cloud be located at the center of the canvas, but the center of the canvas itself is not centered at the display element. EDIT: like this:
This happened for all "cm"/"inch"/"deg" resizing units in virtual-chinrest. I can see that canvas dimensions are equated to the window dimensions inside the RDK plugin,
EDIT: it appears canvas top-left corner ( but I couldn't understand why the canvas origin (0,0) translates from the top left corner to the center of the screen. Is there a way to move the canvas to the top-left of the screen? EDIT: I tried I created a minimal example for this problem. You can download/clone and run to see the problem - it is also accessible with this link. Thank you, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
removing `canvas.style.position = 'absolute'; from the RDK plugin resolved this issue, though this change brought back the scroll bar to the screen. |
Beta Was this translation helpful? Give feedback.
removing `canvas.style.position = 'absolute'; from the RDK plugin resolved this issue, though this change brought back the scroll bar to the screen.