traffic: optimize bounds calculation

It's enough to calculate x/y bounds only once for a dragging gesture.