Connection strategies come into play when the user modifies the position of link endpoints. There are two situations in which this is relevant:

- When the user drags a link endpoint and connects it to an element or its port. The connection strategy determines the end anchor after the user is finished dragging the link endpoint. (Note that any individual `anchor` property that might have been assigned on the dragged link endpoint will be overridden by the connection strategy. If necessary, have a look at the custom connectionStrategy documentation for information on replicating the functionality of anchor functions.)
- When a user creates a link, for example by clicking a port. The connection strategy determines the new link's source anchor.

Both the `anchor` and `connectionPoint` properties are rewritten in response to user interaction. None of the built-in connection strategies preserve the originally assigned anchor and connection point functions. To assign precisely what you need as the anchor and connection point functions, you may need to define your own custom connection strategy.

Connection strategies are not assigned on a link-by-link basis. They are set with the `connectionStrategy` option on a paper.

There are three built-in connection strategies in JointJS:

- `useDefaults` - default strategy; ignore user pointer and use default anchor and connectionPoint functions
- `pinAbsolute` - use user pointer coordinates to position anchor absolutely within end element; use default connectionPoint
- `pinRelative` - use user pointer coordinates to position anchor relatively within end element; use default connectionPoint

The default connection strategy is specified as `null` in paper settings, which is equivalent to `joint.connectionStrategies.useDefaults`.

Built-in connection strategies are specified by reference to their their name in the `joint.connectionStrategies` namespace. Example:

    paper.options.connectionStrategy = joint.connectionStrategies.pinAbsolute;