added onClear handler for clearDrawing function.
modified the issue that the onDrawEnd function was not called when the erasing is end.