Class: Shape

(abstract) ge.shape.Shape(dataopt, nullable)

(abstract) new Shape(dataopt, nullable)

Abstract base shape class.
Parameters:
Name Type Attributes Description
data object <optional>
<nullable>
JSON data.
Source:

Methods

(abstract) doFitTitleInside(node, size, textSize)

Resize a node to fit its title inside.
Parameters:
Name Type Description
node ge.Node Node data.
size ge.ContainerSize Text container size.
textSize ge.TextSize Text size calculator.
Source:

fitTitleInside(node, textSize)

Resize a node to fit its title inside if necessary.
Parameters:
Name Type Description
node ge.Node Node data.
textSize ge.TextSize Text size calculator.
Source:

(abstract) getPoint(node, angle) → {ge.Point}

Return point at angle.
Parameters:
Name Type Description
node ge.Node Node data.
angle ge.Angle Angle.
Source:
Returns:
Type
ge.Point

intersect(node, node2) → (nullable) {ge.Point}

Intersect with a link.
Parameters:
Name Type Description
node ge.Node Node data.
node2 ge.Node Node data.
Source:
Returns:
Intersection point.
Type
ge.Point

(abstract) path(node) → {string}

Return SVG path.
Parameters:
Name Type Description
node ge.Node Node data.
Source:
Returns:
SVG path.
Type
string

toJson() → {object}

Convert to JSON.
Source:
Returns:
JSON data.
Type
object