lib/features/bendpoints/ConnectionSegmentMove.js
function cropConnection(connection, newWaypoints) {

    // crop connection, if docking service is provided only
    if (!connectionDocking) {
      return newWaypoints;
    }

    var oldWaypoints = connection.waypoints,
        croppedWaypoints;

    // temporary set new waypoints
    connection.waypoints = newWaypoints;

    croppedWaypoints = connectionDocking.getCroppedWaypoints(connection);

    // restore old waypoints
    connection.waypoints = oldWaypoints;

    return croppedWaypoints;
  }
function cropConnection(connection, newWaypoints) {

    // crop connection, if docking service is provided only
    if (!connectionDocking) {
      return newWaypoints;
    }

    var oldWaypoints = connection.waypoints,
        croppedWaypoints;

    // temporary set new waypoints
    connection.waypoints = newWaypoints;

    croppedWaypoints = connectionDocking.getCroppedWaypoints(connection);

    // restore old waypoints
    connection.waypoints = oldWaypoints;

    return croppedWaypoints;
  }
function cropConnection ( connection , newWaypoints ) { // crop connection, if docking service is provided only if ( ! connectionDocking ) { return newWaypoints ; } var oldWaypoints = connection . waypoints , croppedWaypoints ; // temporary set new waypoints connection . waypoints = newWaypoints ; croppedWaypoints = connectionDocking . getCroppedWaypoints ( connection ) ; // restore old waypoints connection . waypoints = oldWaypoints ; return croppedWaypoints ; }
Crop connection if connection cropping is provided.

@param {Connection} connection
@param {Array<Point>} newWaypoints

@return {Array<Point>} cropped connection waypoints
Crop connection if connection cropping is provided .