better Layer.bind_popup and add Map.open/close_popup
This commit is contained in:
parent
2affa8b5fa
commit
23ea827e40
6 changed files with 21 additions and 24 deletions
10
src/popup.ml
10
src/popup.ml
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue