Direction
You're browsing the documentation for v3
Direction
Overview
The Direction component resolves the difference among directions.
Methods
resolve()
resolve( prop: string, axisOnly?: boolean ): stringResolves the provided property name according to the current direction.
For example, this resolves marginRight to marginBottom in the TTB mode, and marginLeft in the RTL mode.
Here is a list of acceptable names:
marginRightwidthautoWidthfixedWidthpaddingLeftpaddingRightleftrightleftxXYArrowLeftArrowRight
Params
prop | A property name to translate. |
|---|---|
axisOnly | Optional. If |
Return
A resolved property name.
orient()
orient( value: number ): numberOrients the value towards the current direction.
For example, orient( 100 ) returns -100 in the LTR mode, and 100 in the RTL mode.
Params
value | A value to orient. |
|---|
Return
An oriented value.