0

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.

Wellenbrecher
  • 179
  • 1
  • 9
  • I think this might have already been answered: http://stackoverflow.com/questions/10597827/forcing-canvas-update – erapert Aug 14 '15 at 19:29
  • @erapert Drawing already updates the canvas. The problem is with rotating. This question is about jCanvas library, not HTML5 canvas. – Wellenbrecher Aug 14 '15 at 20:19

1 Answers1

0

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

Wellenbrecher
  • 179
  • 1
  • 9