better Layer.bind_popup and add Map.open/close_popup

This commit is contained in:
Swrup 2022-06-26 04:08:53 +02:00
parent 2affa8b5fa
commit 23ea827e40
6 changed files with 21 additions and 24 deletions

View file

@ -12,16 +12,10 @@ let set_content content =
let (_ : Jv.t) = Jv.call popup "setContent" [| Jv.of_string content |] in
()
let open_on map =
let (_ : Jv.t) = Jv.call popup "openOn" [| Map.to_jv map |] in
()
let close map =
let (_ : Jv.t) = Jv.call (Map.to_jv map) "closePopup" [||] in
()
let of_jv = Fun.id
let to_jv = Fun.id
type opt =
| Pane of string
| Offset of Point.t