Skip to content

Commit dcb9691

Browse files
Ryan A. JohnsonCITguy
authored andcommitted
chore(utils): modify positioning
* opts.margin and opts.offset are no longer recognized by the offset functions directly * margin will be baked into the Shadow DOM CSS * offset will be replaced with dX or dY (depending on the positioning function) * opts.dX added to allow fine-tuning of the calculated X coordinate * opts.dY added to allow fine-tuning of the calculated Y coordinate * getPosition(offsetElement, refElement, config) -> getPosition(PositionConfig) * getPositionWithArrow(offsetElement, refElement, config) -> getPositionWithArrow(PositionConfig) * updated all positioned elements to consume `getPosition()` and `getPositionWithArrow()` with updated signature * updated all positioned elements to be `position: fixed;` * still need to fix the logic to reposition on scroll BREAKING: all functions return { x, y } object instead of [ x, y ] array BREAKING: getPosition() and getPositionWithArrow() only accept a single PositionConfig argument
1 parent 806b04c commit dcb9691

33 files changed

+1342
-369
lines changed

docs/images/api/pos-bottom-end.png

-1.25 KB
Binary file not shown.
-1.31 KB
Binary file not shown.
-1.26 KB
Binary file not shown.
-1.27 KB
Binary file not shown.

docs/images/api/pos-bottom.png

-1.33 KB
Binary file not shown.

docs/images/api/pos-center.png

-1.09 KB
Binary file not shown.
-1.16 KB
Binary file not shown.

docs/images/api/pos-left-end.png

-1.16 KB
Binary file not shown.

docs/images/api/pos-left-start.png

-1.17 KB
Binary file not shown.

docs/images/api/pos-left-top.png

-1.17 KB
Binary file not shown.

0 commit comments

Comments
 (0)