API Docs for:
Show:

PathView Class

Defined in: view\PathView.js:10
Module: modules

Methods

addFakePoints

(
  • An
  • An
)
Array

Provided two paths, this method pushes fake points in order to return equidimensional paths.

Parameters:

  • An Object

    instance of Path (1)

  • An Object

    instance of Path (2)

Returns:

Array: An array of equidimensional path [path1,path2]

animateMinorChanges

()

This method animates a path when it is going to be involved in a minor change. The SVG path blinks.

animateNewPath

()

This method animates a path that was just drawn.

animatePathChange

()

This method animates a path when it is going to be involved in a change of its route.

animateRemove

()

This method animates a path when it is going to be removed. The SVG path blinks and disappears

computeDynamicPathString

(
  • An
)
String

This method computes the SVG representing a dynamic path.

Parameters:

  • An Array

    array of nodes

Returns:

String: An SVG path

computeNormalPathString

(
  • An
)
String

This method computes the SVG representing a path.

Parameters:

  • An Array

    array of nodes

Returns:

String: An SVG path

computePathString

(
  • An
)
String

This method dispatches a computation of an SVG path to a more specific method.

Parameters:

  • An Array

    array of nodes

Returns:

String: An SVG path

computeStaticPathString

(
  • An
)
String

This method computes the SVG representing a static path.

Parameters:

  • An Array

    array of nodes

Returns:

String: An SVG path

firstDraw

()

This method executes the first draw of the SVG representing the path.

getArcDeviationPathString

(
  • An
  • An
  • True
  • The
)
String

This method assigns to each arcs a deviation in order to avoid overlap between arcs belonging to different paths.

Parameters:

  • An Object

    instance of Node

  • An Object

    instance of Node

  • True Boolean

    if the provided nodes are not sorted

  • The Object

    arc belonging to this PathView

Returns:

String: An SVG path

getDrawnArcs

(
  • An
  • The
)
String

This method returns a set of ordered arcs that must be drawn between a nodes pair.

Parameters:

  • An Array

    array of arcs

  • The Object

    arc belonging to this PathView

Returns:

String: An SVG path

getStatistics

()

This method provides percentages about the stability of the source-target pair in terms of sets of nodes involved.

initialize

(
  • A
)

Defined in view\PathView.js:16

The initialization method of this object.

Parameters:

  • A Map

    map of parameters

setVisibility

()

This method updates the visibility of the SVG representing the path.

svgEventManager

()

This method manages the SVG events.

updatePath

(
  • An
)

This method manages the animation of a path involved in an event.

Parameters:

  • An Object

    instance of Event

updateWithoutAnimation

()

This method updates the SVG representing the path without animating it.