finalized reactive structure for lines and rects