简体   繁体   中英

Updating canvas without hovering

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();

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM