Anchors (blue 'x') can be configured using points=[[x0,y0],[x1,y1],...,[xn,yn]] in the style of vertices. You open the style editor via Ctrl/Cmd+E when a cell is selected:



Styles are key/value pairs, in this case the key is "points" and the value is an array of 2 element arrays, i.e. 1st (x,y), 2nd (x,y), etc.

The numbers are relative to the width and height of the vertex with values between 0 and 1 (top left is [0,0], bottom right is [1,1], top right is [1,0], etc). A third parameter with values 0 or 1 can be added, where 1 (default) means move the point to the perimeter of shape and 0 means place anywhere in shape, eg. [[0.5,0.5,0]] places the anchor in the center.


Note that most shapes won't contain the point list when you open the style editor first time, you'll need to add that key.


This key/value pair will result in the connection points shown in the picture below:


points=[[0.25,0],[0.5,0],[0.75,0],[0,0.25],[0,0.5],[0,0.75],[0.25,1],[0.5,1],[0.75,1],[1,0.1],[1,0.2],[1,0.3],[1,0.4],[1,0.5],[1,0.6],[1,0.7],[1,0.8],[1,0.9]]



anchors.png


It can be entered in the dialog as follows:



To connect to anywhere in the shape, ignoring the connection points and shape boundary, hold down the Alt key while connecting:

To ignore all shapes and connection points, hold down they Ctrl and Shift keys at the same time while connecting.


To snap to connection points, see https://desk.draw.io/support/solutions/articles/16000054073