Now can disable and enable the drawing function