Added function to redraw rectangles

Rectangles can now be redrawn when the vis changes