Make canvas resize undoable