- Description:
The orient module provides functions to determine the optimum orientation of a tooltip if auto-sizing is set to true, and to set the proper CSS values for the tooltip's div elements.
- Source:
The orient module provides functions to determine the optimum orientation of a tooltip if auto-sizing is set to true, and to set the proper CSS values for the tooltip's div elements.
Methods
(inner) position(targetElement, target)
- Description:
Sets the position of the tooltip relative to the HTML element with which it is associated.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
targetElement |
string | The unique id of the HTML element that owns the tooltip. |
target |
Tip | The object containing all of the current tooltip's options and content. |
(inner) optimumOrientation(targetElement, target) → {string}
- Description:
Determines the best side upon which to place the tooltip. If auto-positioning is on, the preferred-orientation setting will be honored unless there is insufficient viewport space. in this case, the position with the most available space will be used.
- Source:
- Since:
- v2.2.0
Parameters:
Name | Type | Description |
---|---|---|
targetElement |
string | The DOM element that is associated with the tooltip. |
target |
Tip | The Tip class object containing all of the current tooltip's options and content. |
Returns:
One of ['left' | 'right' | 'top' | 'bottom'].
- Type
- string
(inner) getOrientation(targetElement, target) → {string}
- Description:
Selects the appropriate orientation by deconflicting auto-positioning, prefererd-orientation settings in the Tip{} class object.
- Source:
- Since:
- v2.1.2
Parameters:
Name | Type | Description |
---|---|---|
targetElement |
string | The DOM element that is associated with the tooltip. |
target |
Tip | The Tip class object containing all of the current tooltip's options and content. |
Returns:
One of ['left' | 'right' | 'top' | 'bottom'].
- Type
- string