Drawing in canvas with undo redo