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.
Solved. This function refreshes the canvas: $('canvas').drawLayers();