Integrate canvas position with connections and distance calculations