Creating an Anchor. The default value for Anchor will be 'top-left' ({xPercent: 0, yPercent: 0}).
Name | Type | Description |
---|---|---|
value |
String | Object |
A string describing the position or an object with 2 properties: xPercent, yPercent. The percent values should be between 0 (top/left) and 100 (bottom/right). Percents below 0 will become 0 and values abouve 100 will become 100. See the Anchor Names table for possible string values and their corresponding x/y Percents. |
Members
-
nameString
-
Get or set the anchor name. If a string can not describe the anchor, undefined will be returned.
-
xPercentNumber
-
Get or set the xPercent. The value will be constrained between 0 and 100.
-
yPercentNumber
-
Get or set the yPercent. The value will be constrained between 0 and 100.
Methods
-
Returns JSON representing this anchor, either as a name or an object with xPercent and yPercent properties.
-
Return the class name as a string.
Returns:
Type Description String - 'Anchor'