add the function to repaint the canvas by selecting deferent drawing element ; fix bug of drawing
fix drawing bug