Updating canvas without hovering

92 Views Asked by At

I'm making something like MS Paint using jCanvas library. I've put a button OUTSIDE the canvas. The button rotates the selected layer clockwise but I can't see any change unless I hover the canvas with mouse. I want the layer to be rotated by the time I press the button.

I tried using restoreCanvas() function but it didnt't work. How can I make a canvas automatically refreshed when a button out of it is pressed?

Sorry for bad English.

1

There are 1 best solutions below

0
On BEST ANSWER

Solved. This function refreshes the canvas: $('canvas').drawLayers();