Class InteractableManager
Class defined in:src/node-interactable.js:25
Interactable container object
addComplexGeometry
( id, layerId, shapeData, zIndex, data
)
src/node-interactable.js:112
Add new object (with complex geomtry - comprising of rectangles and circles) to a layer
Parameters:-
id
<String>unique identifier for the geometric object
-
layerId
<String>unique identifier for the layer
-
shapeData
<Object>containing type, geometry, and visibiility of each of the comprising elements
-
zIndex
<Integer>determines ordering of the geometries within a given layers
-
data
<Object>data to store along with given geometry
addGeometry
( id, layerId, type, geometry, visible, zIndex, data
)
src/node-interactable.js:74
Add new object (with geomtry - rectangle or circle) to a layer
Parameters:-
id
<String>unique identifier for the geometric object
-
layerId
<String>unique identifier for the layer
-
type
<String>"rectangle" or "circle"
-
geometry
<Obejct>defines object (rectangle = {x: , y: , w: , h: }, circle = {x: , y: , r: })
-
visible
<Boolean>whether or not the geometric object is currently visible
-
zIndex
<Integer>determines ordering of the geometries within a given layers
-
data
<Object>data to store along with given geometry
addLayer
( id, zIndex
)
src/node-interactable.js:38
Add new layer of interactable objects
Parameters:-
id
<String>unique identifier for the layer
-
zIndex
<Integer>determines ordering of the layers
editComplexGeometry
( id, layerId, shapeData
)
src/node-interactable.js:209
Edit geometric object position / size / type
Parameters:editGeometry
( id, layerId, type, geometry
)
src/node-interactable.js:175
Edit geometric object position / size / type
Parameters:editVisibility
( id, layerId, visible, partId
)
src/node-interactable.js:277
Edit visibility of geometric object
Parameters:editZIndex
( id, layerId, zIndex
)
src/node-interactable.js:307
Edit zIndex of geometric object
Parameters:findGeometryBelowZIndex
( zIndex, geometryList, ignoreList
)
src/node-interactable.js:544
Finds the geometry just below the zIndex (highest zIndex)
Parameters:-
zIndex
<Number>zIndex value of the app
-
geometryList
<Array>list of geometric objects
-
ignoreList
<Array>list of ids to ignore during the search
geometric object
findTopmostGeometry
( point, geometryList, ignoreList
)
src/node-interactable.js:459
Finds for topmost geometric object (highest zIndex)
Parameters:-
point
<Object>{x: , y: }
-
geometryList
<Array>list of geometric objects
-
ignoreList
<Array>list of ids to ignore during the search
geometric object
getLayerId
( id
)
src/node-interactable.js:259
Get the ID of the layer for this geometry
Parameters:-
id
<String>unique identifier for the geometric object
layerId unique identifier for the layer
getObject
( id, layerId
)
src/node-interactable.js:410
Get geometric object with given id
Parameters:-
id
<String>unique identifier for the geometric object
-
layerId
<String>unique identifier for the layer
object geometric object with given id
getObjectZIndexList
( layerId, otherLayerIds
)
src/node-interactable.js:384
Move geometric object to front (edit zIndex)
Parameters:-
layerId
<String>unique identifier for the layer
-
otherLayerIds
<Array>unique identifiers for other layers to include in list
zIndexList list of geometric object ids and there zIndex values
getZIndexOfObj
( obj
)
src/node-interactable.js:585
Get method for the zIndex of an Object
Parameters:-
obj
<Object>pkg information of the geometric object
hasObjectWithId
( id
)
src/node-interactable.js:242
Check if an object with given id exists or not
Parameters:-
id
<String>unique identifier for the geometric object
hasObject whether or not an object with the given id exists
moveObjectToBack
( id, layerId, otherLayerIds
)
src/node-interactable.js:352
Move geometric object to back (edit zIndex)
Parameters:moveObjectToFront
( id, layerId, otherLayerIds
)
src/node-interactable.js:320
Move geometric object to front (edit zIndex)
Parameters:removeGeometry
( id, layerId
)
src/node-interactable.js:155
Remove geometric object from a layer
Parameters:removeLayer
( id
)
src/node-interactable.js:56
Remove layer of interactable objects
Parameters:-
id
<String>unique identifier for the layer
searchGeometry
( point, layerId, ignoreList
)
src/node-interactable.js:425
Search for topmost geometric object (optionally within a given layer)
Parameters:-
point
<Object>{x: , y: }
-
layerId
<String>unique identifier for the layer
-
ignoreList
<Array>list of ids to ignore during the search
geometric object
searchGeometryInBox
( box, layerId, ignoreList
)
src/node-interactable.js:500
Search for topmost geometric object (optionally within a given layer)
Parameters:-
box
<Object>{x1: , y1: , x2: , y2: }
-
layerId
<String>unique identifier for the layer
-
ignoreList
<Array>list of ids to ignore during the search
geometric object
setZIndexOfObj
( obj, zIndex
)
src/node-interactable.js:602
Set method for the zIndex of an Object
Parameters:-
obj
<Object>pkg information of the geometric object
-
zIndex
<Integer>determines ordering of the geometries within a given layers