Hi Dennis,
There is a slight error in your code: the last Undo button is missing a closing } for the press function, and the 'enabled' property contains a rogue comma, but other than that, kudo's for your work here!
Rashmi, it seems like Dennis Seah has created the perfect case on why you should consider writing your own custom control instead of using the standard <canvas> element