circle
Creates a cricle.
Table of Contents
-
Methods
- $disabled()
- addChild(child)
- addLinkFrom(element)
- addLinkTo(element)
- adjustPosition(newXnewY)
- beforeRemoveLinkFrom(doWhat)
- beforeRemoveLinkTo(doWhat)
- canLink(fromto)
- canReach()
- clearAllLinks()
- clearLinksFrom(sourceeach)
- click(xyeleevt)
- disable()
- elementDisabledNotification()
- existsIn(xy)
- getAdjustedCoordinates()
- getBoundaries()
- getChildElements()
- getHeight()
- getLinksFrom()
- getLinksTo()
- getParent()
- getWidth()
- isLinkable()
- isSerializable()
- normalize()
- notifyDisableStateOn()
- release(xyeleevt)
- removeLinkFrom(element)
- removeLinkTo(element)
- setHeight(newHeight)
- setParent(parent)
- setWidth(newWidth)
- toggleFullScreen(ThestrContainerId)
- Properties
- Attributes
Methods
$disabled
()
A simple helper function to be used whenever this instance gets disable (if ever)
Adds a new child element to this node
Parameters:
-
child
_basicElementElement that will be added to the child array into this element
Returns:
Updated Raska element reference
addLinkFrom
-
element
Links this element to another Raska element as this instance being the target node
Parameters:
-
element
_basicElementElement that will be linked as a source from this element node
Returns:
Whether or not the link was added
addLinkTo
-
element
Creates a link between this and another element, using the later as a dependency of this instance
Parameters:
-
element
_basicElementElement that will be linked as a destination from this element node
Returns:
Whether or not the link was added
adjustPosition
-
newX
-
newY
[ABSTRACT] Adjusts the position of the current element taking in consideration it's parent positioning constraints
Parameters:
-
newX
NumberX position
-
newY
NumberY position
beforeRemoveLinkFrom
-
doWhat
Event triggered before a link gets removed from this element
Parameters:
-
doWhat
FunctionA delegate with the 'this' poiting to this instance and the first paramenter being the reference to the element which is being remove as a link to this instance
beforeRemoveLinkTo
-
doWhat
Event triggered before a link gets removed to this element
Parameters:
-
doWhat
FunctionA delegate with the 'this' poiting to this instance and the first paramenter being the reference to the element which is being remove as a link from this instance
canLink
-
from
-
to
Allows to better check whether or not a new link can be created beteen two elements
Parameters:
-
from
_basicElementElement that will be linked as a source
-
to
_basicElementElement that will be linked as a destination
Returns:
Whether or not the link can be created
canReach
()
Bool
Whether or not this element can reach another element via a linked relation
Returns:
Whether or not a link exists
Removes every and each link that references this element
Returns:
Updated Raska element reference
clearLinksFrom
-
source
-
each
Clears all links that point to and from this Raska element
Parameters:
-
source
ObjectObject that defines the source of the link removal (start node)
-
each
FunctionDelegates that handle the process of removing the references
Returns:
Empty array
click
-
x
-
y
-
ele
-
evt
Triggered whenever a click iteraction occurs within the boundaries of this element.
- This event is only supported on selected elements. Check for the canHandleEvents property value before relying on this delegate
Parameters:
-
x
NumberElement's current X position
-
y
NumberElement's current Y position
-
ele
_basicElementThe element that was clicked
-
evt
EventEvent that triggered the delegate
disable
()
Clears all references and child elements from this instance
elementDisabledNotification
()
Handles element disabling notifications
existsIn
-
x
-
y
Whether or not this element existis withing the boudaries of the given x/y coordinates
Parameters:
-
x
NumberX Coordinate
-
y
NumberY Coordinate
Returns:
If this element is contained within the X/Y coordinates
getAdjustedCoordinates
()
X:Number,y:Number
Gathers adjusted x/y coordinates for the currente element taking into consideration the type of positining set to it and wheter or not a parent node is present
Returns:
Adjusted coordinates
getBoundaries
()
Object
Retrieves the element boundaries information
Returns:
Data regarding x, y, minX and minY from this element
getChildElements
()
Array
Gathers all child elements from this node
Returns:
All child elements
getHeight
()
Number
[ABSTRACT] Gets the current Height for this element
Returns:
The Height of this element
getLinksFrom
()
Array
Gathers all dependecies/linked elements related to this instance
Returns:
All elements that this node references from
getLinksTo
()
Array
Gathers all elements that this instance depends on
Returns:
All elements that this node references TO
Get the parent node to this element
Returns:
Reference to de parent node (null if none)
getWidth
()
Number
[ABSTRACT] Gets the current width for this element
Returns:
The width of this element
isLinkable
()
Bool
Is this element passive of being linked at all?
Returns:
Whether or not a link can be created either from or to this element
isSerializable
()
Bool
Is this element passive of being serialized at all?
Returns:
Whether or not this element is suposed to be serialized
normalize
()
Transposes the getter data to a field attached to this instance
notifyDisableStateOn
()
Notifies a given element whenever (if ever) this element gets disabled
release
-
x
-
y
-
ele
-
evt
Triggered whenever a 'clickUp' iteraction occurs within the boundaries of this element.
- This event is only supported on selected elements. Check for the canHandleEvents property value before relying on this delegate
Parameters:
-
x
NumberElement's current X position
-
y
NumberElement's current Y position
-
ele
_basicElementThe element that was clicked
-
evt
EventEvent that triggered the delegate
Removes the link to this element from another Raska element
Parameters:
-
element
_basicElementElement that will have its link from this element removed
Returns:
Updated Raska element reference
Removes the dependency from this element to another Raska element
Parameters:
-
element
_basicElementElement that will have its link to this element removed
Returns:
Updated Raska element reference
setHeight
-
newHeight
[ABSTRACT] Sets the current Height for this element
Parameters:
-
newHeight
NumberThe height for this element
Sets the parent node to this element
Parameters:
-
parent
_basicElementElement that will be added as a parent to this element
Returns:
Updated Raska element reference
setWidth
-
newWidth
[ABSTRACT] Sets the current width for this element
Parameters:
-
newWidth
NumberThe width for this element
toggleFullScreen
-
The
-
strContainerId
Toggles canvas in/out fullscreen mode
Parameters:
-
The
HTMLElement | NodeCanvas element
-
strContainerId
StringThe id for the canvas toolbar (or undefined if nothing needs to be done there)
Properties
$beforeRemoveLinkFrom
Function
Holds the reference to the delegate triggered before a link gets removed from an element
Default: null
$beforeRemoveLinkTo
Function
Holds the reference to the delegate triggered before a link gets removed to an element
Default: null
$childElements
_basicElement
private
Points to series of child Raska element (if any) that, usually, are contained inside this node
Default: []
$hitTestCanvas
CanvasRenderingContext2D
protected
A simple canvas used to perform a pixel model hit test agains this element
$linksFrom
_basicElement
private
Points to a Raska element [as an arrow] (if any) that depends on this instance
Default: []
$linksTo
_basicElement
private
Points to a Raska element [as an arrow] (if any) related as a dependency from this node
Default: []
$parent
Unknown
private
Points to a parent Raska element (if any)
Default: null
active
Bool
Whether or not a border should be rendered
Default: false
attr
Object
Just an empty attribute bag where you can save extra stuff that you need/want to serialize
Default: "{}"
canHandleEvents
Bool
Whether or not this element handle event interactions
Default: false
color
String
Element border color
Default: null
getType
_elementTypes
The element type
Default: _elementTypes.basic
graphNode
Bool
Wheter or not this element is part of the graph as a node
Default: true
name
String
The element name
Default: "anonymous"
position
_positionTypes
Element position type
Default: _positionTypes.relative
width
Number
Border width
Default: 0
x
Number
Element x position
Default: 50
y
Number
Element y position
Default: 50