Zooming in FF clears a canvas

If you draw inside a canvas then zoom in or out using the browser zoom controls (in my case, ctl-mousewheel) the canvas instantly blanks.

Is there anyway to trigger an event when this happens in Anvil, so I can redraw it? I can probably get some JS to do it.

1 Like

Ignore me - there is a canvas event called “reset”, which is triggered in such circumstances. I can do the redraw from there.

This happens to me sometimes as well. Did you need to use JS to redraw?

No, because I use an update routine to draw in the canvas, so I just call that in the reset event of the canvas.

All the values are stored in the form so it’s no real bother for me.

1 Like

Thanks. That’s perfect. I will try that.

I’m messing about with creating my own check box purely in anvil (because the built in ones just do not properly line up the text with the box on Firefox, especially when you zoom as I do). It’s harder than you think.

Once I’ve got that working I’ll share it.

1 Like