Use better mechanism for getting coordinates and sizes of spans
and rects when drawing connections.