new LengthConfigs()
Draw length and related options.
In this class, every property value should be a float based on unitLength.
To retrieve a value based on px, a easy way is call getActualLength(propName) method.
Properties:
Name | Type | Description |
---|---|---|
unitLength |
Float | The unit length in px. Every other length are based on this property. For instance, if a bond length is 12 and unit length is 2px, then the actual bond length will be 24px. //@property {Float} labelFontSize Default font size to draw labels. For example: 12. //@property {Float} atomFontSize Default font size to draw atoms and other chem nodes. For example: 12. |
atomLabelBoxExpandRatio |
Float | Atom label box width/height should be a little large then font size. This value is quite useful in clip bond between nodes. |
chargeMarkFontSize |
Float | Size of font to draw charge and radical mark. |
chargeMarkMargin |
Float | Gap between charge/radical mark center and node point. //@property {Float} chargeMarkCircleWidth Width of circle stroke around charge mark. Not used yet. |
chemMarkerFontSize |
Float | Default size of font to draw chem marker. |
chemMarkerMargin |
Float | Default gap between chem marker object center and node point. |
allenCenterAtomRadius |
Float | Radius of dot drawn in allen center carbon. 0 for do not draw explicit dot. |
defBondLength |
Float | Default length of a chem bond. |
bondLineWidth |
Float | Line width to draw a general bond. |
boldBondLineWidthRatio |
Float | Times of line width to a normal line to draw a bold bond line. |
hashSpacing |
Float | Spacing between small lines in hash bond line. |
multipleBondSpacingRatio |
Float | Spacing between two lines in double or triple bond. This value related to bond length. The actual value should be calculated when drawing. |
multipleBondSpacingAbs |
Float | Spacing between two lines in double or triple bond. This value is fixed (regardless of bond length). |
multipleBondMaxAbsSpacing |
Float | If this value is set, the max spacing between multiple bond is fixed. |
bondArrowLength |
Float | The length of end triangle in arrow bond. |
bondArrowWidth |
Float | The width of end triangle in arrow bond. |
bondWedgeWidth |
Float | The width of end triangle in wedge bond. |
bondWedgeHashMinWidth |
Float | Start a hash wedge from 0 is often make some part hard to see. So we start from a small width to make better outlooks. |
bondWavyRadius |
Float | Radius to draw arc of wavy bond. |
glyphStrokeWidth |
Float | The default width of glyph strokes. |
rxnMolMargin |
Float | Magin between reactants/products in reaction formula. |
autofitContextPadding |
Float | Padding length when draw on context with drawOptions.autofit. |
- Source:
Extends
- Kekule.AbstractConfigs
Methods
-
getActualLength(propName) → {Float}
-
Get actual length in px for a config property.
Parameters:
Name Type Description propName
String - Source:
Returns:
- Type
- Float