Module Byo_toplayer_private_floating.Anchor

type t
val sexp_of_t : t -> Sexplib0.Sexp.t

An element in the dom relative to which the floating element will be positioned.

val of_bounding_box : relative_to:[ `Viewport | `Document ] -> top:float -> left:float -> bottom:float -> right:float -> t

top, bottom, and left, right are the # of pixels down and right from the top left corner to form the (top, bottom), and (left, right) borders of the virtual bounding box.

relative_to defaults to `Viewport, and determines whether the coordinates you provide should be in terms of "Client" or "Page" coordinate systems: https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_view/Coordinate_systems

val of_coordinate : relative_to:[ `Viewport | `Document ] -> x:float -> y:float -> t

x and y are the # of pixels right/down from the top left corner.

relative_to defaults to `Viewport, and determines whether the coordinates you provide should be in terms of "Client" or "Page" coordinate systems: https://developer.mozilla.org/en-US/docs/Web/CSS/CSSOM_view/Coordinate_systems