update distance when segment is dragged
add updatePath() (unfinished) and minor fixes