Class Index | File Index

Classes


Class links.Network.Link

Link A link connects two nodes
Defined in: network.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
links.Network.Link(properties, network, constants)
Method Summary
Method Attributes Method Name and Description
 
draw(ctx)
Redraw a link Draw this link in the given canvas The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d");
 
Retrieve the length of the links alternate dashes.
 
Retrieve the length of the links dashes gaps.
 
Retrieve the length of the links dashes.
 
Retrieve the length of the link.
 
get the title of this link.
 
Retrieve the value of the link.
 
Check if the length is fixed.
 
Check if a node has an animating contents.
 
Check if this object is overlapping with the provided object
 
setAltDashLength(altdashlength)
Adjust the length of the links alternate dashes.
 
setDashGap(dashgap)
Adjust the length of the links dashes gaps.
 
setDashLength(dashlength)
Adjust the length of the links dashes.
 
setLength(length)
Adjust the length of the link.
 
setProperties(properties, constants)
Set or overwrite properties for the link
 
setValueRange(min, max)
Adjust the value range of the link.
Class Detail
links.Network.Link(properties, network, constants)
Parameters:
{Object} properties
Object with properties. Must contain At least properties from and to. Available properties: from (number), to (number), color (string), width (number), style (string), length (number), title (string)
{links.Network} network
A network object, used to find and link to nodes.
{Object} constants
An object with default values for example for the color
Method Detail
draw(ctx)
Redraw a link Draw this link in the given canvas The 2d context of a HTML canvas can be retrieved by canvas.getContext("2d");
Parameters:
{CanvasRenderingContext2D} ctx

{Number} getAltDashLength()
Retrieve the length of the links alternate dashes. Can be undefined
Author: David Jordan.
Returns:
{Number} altdashlength

{Number} getDashGap()
Retrieve the length of the links dashes gaps. Can be undefined
Author: David Jordan.
Returns:
{Number} dashgap

{Number} getDashLength()
Retrieve the length of the links dashes. Can be undefined
Author: David Jordan.
Returns:
{Number} dashlength

{Number} getLength()
Retrieve the length of the link. Can be undefined
Returns:
{Number} length

{string} getTitle()
get the title of this link.
Returns:
{string} title The title of the link, or undefined when no title has been set.

{Number} getValue()
Retrieve the value of the link. Can be undefined
Returns:
{Number} value

{boolean} isLengthFixed()
Check if the length is fixed.
Returns:
{boolean} lengthFixed True if the length is fixed, else false

{boolean} isMoving()
Check if a node has an animating contents. If so, the graph needs to be redrawn regularly
Returns:
{boolean} true if this link needs animation, else false

{boolean} isOverlappingWith(obj)
Check if this object is overlapping with the provided object
Parameters:
{Object} obj
an object with parameters left, top
Returns:
{boolean} True if location is located on the link

setAltDashLength(altdashlength)
Adjust the length of the links alternate dashes.
Author: David Jordan.
Parameters:
{Number} altdashlength

setDashGap(dashgap)
Adjust the length of the links dashes gaps.
Author: David Jordan.
Parameters:
{Number} dashgap

setDashLength(dashlength)
Adjust the length of the links dashes.
Author: David Jordan.
Parameters:
{Number} dashlength

setLength(length)
Adjust the length of the link. This can only be done when the length is not fixed (which is the case when the link is created with a length property)
Parameters:
{Number} length

setProperties(properties, constants)
Set or overwrite properties for the link
Parameters:
{Object} properties
an object with properties
{Object} constants
and object with default, global properties

setValueRange(min, max)
Adjust the value range of the link. The link will adjust it's width based on its value.
Parameters:
{Number} min
{Number} max

Documentation generated by JsDoc Toolkit 2.3.2 on Fri Apr 26 2013 14:32:41 GMT+0200 (CEST)