add popup options

This commit is contained in:
Swrup 2022-06-20 10:05:35 +02:00
parent a438e54f42
commit ede9b2076d
6 changed files with 101 additions and 9 deletions

View file

@ -2,6 +2,24 @@
type t
(** type for popup option used to create an popup*)
type opt =
| Pane of string
| Offset of Point.t
| Max_width of int
| Min_width of int
| Max_height of int
| Auto_pan of bool
| Auto_pan_padding_top_left of Point.t
| Auto_pan_padding_bottom_right of Point.t
| Auto_pan_padding of Point.t
| Keep_in_view of bool
| Close_button of bool
| Auto_close of bool
| Close_on_escape_key of bool
| Close_on_click of bool
| Class_name of string
(** [set_latlng latlng] changes the popup position to the given point*)
val set_latlng : Latlng.t -> unit
@ -16,3 +34,12 @@ val close : Map.t -> unit
(** [of_jv jv] is [jv] as {!t} *)
val of_jv : Jv.t -> t
(** [opt_to_string opt] is [opt] as {!string} *)
val opt_to_string : opt -> string
(** [opt_to_jv opt] is [opt] as {!Jv.t} *)
val opt_to_jv : opt -> Jv.t
(** [create options] is a new popup setup withs [options] *)
val create : opt list -> t