Anchor

An anchor is a function that takes a node and an edge, and returns a function that is used to calculate the anchor point. That function takes the anchor point - the point that the function will manipulate and a reference point, which is used by the anchor function to determine where to locate the anchor.

The "this" pointer for an anchor function is always the display

Examples:

An anchor that binds an edge to the center of a node: function centerAnchor(edge,node) { return function(anchorPoint,referencePoint) { anchorPoint.set(this.position(node)); }; }

DEFINITION

function ( this:thinkmap.display.Display , thinkmap.graph.Edge , thinkmap.graph.Node ) ⇒ function ( this:thinkmap.display.Display , thinkmap.geom.Point , thinkmap.geom.Point )