Resizing HTML canvas

Resizing HTML canvas

  

Hi,

I need to be able to resize a canvas. I found that I was able to do so using CSS zoom or transform: scale(). However, doing so caused the canvas to be unclickable. Attached is an example. The green rectangle is supposed to be movable. Is there any way to change the viewport or resolve this issue? Thanks in advance.

Regards,

Louie

Louie Ng wrote:

Hi,

I need to be able to resize a canvas. I found that I was able to do so using CSS zoom or transform: scale(). However, doing so caused the canvas to be unclickable. Attached is an example. The green rectangle is supposed to be movable. Is there any way to change the viewport or resolve this issue? Thanks in advance.

Regards,

Louie

Attached is an example in which the canvas was not resized where the green rectangle was able to be moved (I was unable to attach two attachments at once)