-
appendMarker(marker)
-
Attach a marker to this object. If marker already exists, nothing will be done.
Parameters:
- Inherited From:
- Source:
-
clearMarkers()
-
Remove all attached markers.
- Inherited From:
- Source:
-
fetchMarkerOfType(classType, canCreate, exactMatch, defProps) → {Kekule.ChemObject}
-
Get attached marker of classType. If no such a marker currently and canCreate is true, a new marker will be created.
Parameters:
Name |
Type |
Description |
classType |
Class
|
|
canCreate |
Bool
|
|
exactMatch |
Bool
|
If true, only marker of classType (not its descendants) should be returned. |
defProps |
Hash
|
If create a new marker, those prop values will be applied. |
- Inherited From:
- Source:
Returns:
-
Type
-
Kekule.ChemObject
-
getContainerBox(coordMode, allowCoordBorrow) → {Hash}
-
Calculate the box to fit the image on context.
Parameters:
Name |
Type |
Description |
coordMode |
Int
|
Determine to calculate 2D or 3D box. Value from Kekule.CoordMode. |
allowCoordBorrow |
Bool
|
|
- Source:
Returns:
Box information. {x1, y1, z1, x2, y2, z2} (in 2D mode z1 and z2 will not be set).
-
Type
-
Hash
-
getCornerCoord1(coordMode, allowCoordBorrow) → {Object}
-
Returns coord of top-left corner of block.
Parameters:
Name |
Type |
Description |
coordMode |
Int
|
|
allowCoordBorrow |
Bool
|
|
- Source:
Returns:
-
Type
-
Object
-
getCornerCoord2(coordMode, allowCoordBorrow) → {Object}
-
Returns coord of bottom-right corner of block.
Parameters:
Name |
Type |
Description |
coordMode |
Int
|
|
allowCoordBorrow |
Bool
|
|
- Source:
Returns:
-
Type
-
Object
-
-
Get attached marker at index.
Parameters:
Name |
Type |
Description |
index |
Int
|
|
- Inherited From:
- Source:
Returns:
-
Type
-
Kekule.ChemObject
-
getMarkerCount() → {Int}
-
Return count of attached markers.
- Inherited From:
- Source:
Returns:
-
Type
-
Int
-
getMarkerOfType(classType, exactMatch) → {Kekule.ChemObject}
-
Returns the first child marker of a specified class type.
Parameters:
Name |
Type |
Description |
classType |
Class
|
|
exactMatch |
Bool
|
If true, only marker of classType (not its descendants) should be returned. |
- Inherited From:
- Source:
Returns:
-
Type
-
Kekule.ChemObject
-
getMarkersOfType(classType, exactMatch) → {Array}
-
Returns all child markers of a specified class type.
Parameters:
Name |
Type |
Description |
classType |
Class
|
|
exactMatch |
Bool
|
If true, only markers of classType (not its descendants) should be returned. |
- Inherited From:
- Source:
Returns:
-
Type
-
Array
-
getUnplacedMarkers(coordMode) → {Array}
-
Returns markers that has no coord on coordMode
Parameters:
Name |
Type |
Description |
coordMode |
Int
|
|
- Inherited From:
- Source:
Returns:
-
Type
-
Array
-
hasMarker(marker) → {Bool}
-
Check if a marker has been attached to this object.
Parameters:
- Inherited From:
- Source:
Returns:
-
Type
-
Bool
-
hasMarkerOfType(classType, exactMatch) → {Bool}
-
Returns whether there exists child markers of a specified class type.
Parameters:
Name |
Type |
Description |
classType |
Class
|
|
exactMatch |
Bool
|
If true, only markers of classType (not its descendants) should be considered. |
- Inherited From:
- Source:
Returns:
-
Type
-
Bool
-
indexOfMarker(marker) → {Int}
-
Get index of attached marker in marker array.
Parameters:
- Inherited From:
- Source:
Returns:
-
Type
-
Int
-
insertMarkerAt(marker, index)
-
Insert marker to index. If index is not set, marker will be inserted to the tail of the marker array.
Parameters:
- Inherited From:
- Source:
-
insertMarkerBefore(marker, refMarker) → {Int}
-
Insert marker before refMarker in marker list. If refMarker is null or does not exists, marker will be append to tail of list.
Parameters:
- Inherited From:
- Source:
Returns:
Index of obj after inserting.
-
Type
-
Int
-
isAttachedMarker() → {Bool}
-
Returns whether current object is an attachedMarker of parent object.
- Inherited From:
- Source:
Returns:
-
Type
-
Bool
-
removeMarker(marker)
-
Remove an attached marker.
Parameters:
- Inherited From:
- Source:
-
removeMarkerAt(index)
-
Remove marker at index in attached marker list.
Parameters:
Name |
Type |
Description |
index |
Int
|
|
- Inherited From:
- Source:
-
replaceMarker(oldMarker, newMarker)
-
Replace oldMarker with new one.
Parameters:
- Inherited From:
- Source:
-
setMarkerIndex(marker, index)
-
Change index of marker.
Parameters:
- Inherited From:
- Source: