Methods
(inner) translateAnchor(anchoropt, x, y, width, height) → {object}
- Source:
Returns real x and y values from a relative positioning.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
anchor |
string |
<optional> |
"top-left"
|
Position of the anchor. Can be one out of
|
x |
number | X position to translate. |
||
y |
number | Y position to translate. |
||
width |
number | Width of the element. |
||
height |
number | Height of the element. |
Returns:
Object with members x and y as numbers
- Type
- object