You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The measured position of the target element as a [DOMRect-shaped] object.
26
27
27
-
### `content`: object
28
-
*required*
28
+
### `content`: object
29
+
30
+
_required_
29
31
30
32
The measured width and height of the tooltip content. as a [dimensions] object.
31
33
32
-
### `bounds`: object
33
-
*required*
34
+
### `bounds`: object
35
+
36
+
_required_
34
37
35
38
The measured position of the available layout area for the tooltip content as a [DOMRect-shaped] object. This defines the outer collision boundaries referenced by the `constrain` option.
36
39
37
40
> This should be the browser viewport rect in most instances.
38
41
39
42
### `region`: string
40
43
41
-
*optional*
44
+
_optional_
42
45
43
46
The preferred region in which the tooltip will appear at first relative to its target. Possibly values are: `top`, `bottom`, `left`, and `right`.
44
47
45
48
> If `region` is omitted, the algorithm will pick default to the region with the most available space. (handled by the `getIdealRegion` function)
46
49
47
50
### `offset`: number
48
51
49
-
*optional*, *default: `0`*
52
+
_optional_, _default: `0`_
50
53
51
54
The desired distance between the positioned content and the target.
52
55
53
56
Since the layout algorithm does not factor the size of an indicator triangle element into the calculation, this value should be supplied as the combined length of the indicator plus the desired margin.
54
57
55
58
### `overlap`: number
56
59
57
-
*optional*, *default: `0`*
60
+
_optional_, _default: `0`_
58
61
59
62
The minimum overlap along an edge for each region to be considered valid.
60
63
@@ -64,13 +67,13 @@ If you are rendering an indicator triangle, this should be the minimum linear ov
64
67
65
68
### `align`: string | number
66
69
67
-
*optional*, *default: `center`*
70
+
_optional_, _default: `center`_
68
71
69
72
Linear alignment between the positioned content and the target. Possible values are a number in the range of `0` to `1`, or one of `start`, `center`, and `end` (aliases for `0`, `0.5`, and `1` respectively).
Map of boolean values denoting particular boundary edges should constrain the positioned tooltip.
94
97
@@ -100,5 +103,5 @@ While `flowtip-core` has no dependency on the DOM, it is designed to be directly
100
103
101
104
The absolute reference frame of the measurements does not have an impact on the calculation - as long as all measurements are relative to the same frame everything will work out.
0 commit comments