To snap to anchor points, use snapToPoint=1 in the vertex or edge style (Ctrl+E)