drawsvg iconDRAWSVG user's manual
PreviousNextContentsPDFdrawsvg

8.2. Connect points constraint

This type of constraints allows to share points between elements.

When transforming an object that share points with this type of constraint, the transformation applied to the points will be propagated to the associated elements.

Figure 8.3. Connect points

Connect points

A connect points constraint refers two elements and the indices (index-p1,index-p2) of the shared point for each element.

        
<defs id="drawsvgConstraints">
<defs id="constraint1" drawsvg:constraint="{'type':'connectPoints', 'ids':['e2_pathH','e7_line'], 'priority':0, 'index-p1':2, 'index-p2':0}"/>
<defs id="constraint2" drawsvg:constraint="{'type':'connectPoints', 'ids':['e4_pathH','e7_line'], 'priority':0, 'index-p1':0, 'index-p2':1}"/>
</defs>
        
      

The constraint is defined when drawing elements with point capture, or when moving and merging points.

See showcases constraint connected points , merging point , draw with point capture ,