ReferenceattractToGrid

<attractToGrid/>

<attractToGrid> is a Graphical component that is used to within a <point> to attract it to a specified grid. This component must be nested within a <constraints> block.

Attributes and Properties

Attributes for <attractToGrid>
AttributeTypeValues
dx = "…"number
dy = "…"number
dz = "…"number
includeGridlines = "…"boolean"true" "false"
xoffset = "…"number
xthreshold = "…"number
yoffset = "…"number
ythreshold = "…"number
zoffset = "…"number
zthreshold = "…"number
Props for <attractToGrid name="a">
PropertyType
$a.disabledboolean
$a.dxnumber
$a.dynumber
$a.dznumber
$a.fixedboolean
$a.fixLocationboolean
$a.hiddenboolean
$a.includeGridlinesboolean
$a.xoffsetnumber
$a.xthresholdnumber
$a.yoffsetnumber
$a.ythresholdnumber
$a.zoffsetnumber
$a.zthresholdnumber

Example: Attract <point> to a grid, default behavior

The default grid spacing for attraction for a <point> with the <attractToGrid> constraint is 1.


Attribute Example: dx, dy

The dx and dy attributes allow for customization of the attraction grid. Note that it is not required to display the grid in the graph; this is done for illustration.


Attribute Example: xOffset, yOffset

With the xOffset and yOffset attributes, the spacing of attraction gridlines can be adjusted to a specific offset of the specified dx and dy.

The grey points are included as an illustration of where the offset attraction grids occur.


Attribute Example: xThreshold, yThreshold

The xThreshold and yThreshold attributes can be used to control how close the <point> must be to a grid for attraction to take effect. Notice the different behavior above when dragging the point close to the xx gridlines and yy gridlines.


Property Example: Attributes as properties

The attributes of <attractToGrid/> shown in the example above are also available as properties.