From 827023a056dd7d2d6423f77011c26c844a2be8d6 Mon Sep 17 00:00:00 2001 From: Swrup Date: Wed, 26 Jan 2022 07:54:29 +0100 Subject: [PATCH] better popup --- src/js_newthread.ml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/js_newthread.ml b/src/js_newthread.ml index 1e1709f..75bf388 100644 --- a/src/js_newthread.ml +++ b/src/js_newthread.ml @@ -7,8 +7,9 @@ module Leaflet = struct | Some l -> l | None -> failwith "can't load leaflet" - (* get popup object *) - let popup = Jv.call leaflet "popup" [||] + (* get popup object, with no close button*) + let popup = + Jv.call leaflet "popup" [| Jv.obj [| ("closeButton", Jv.false') |] |] (* create a map *) let map = @@ -81,7 +82,8 @@ let on_click e = let lat_lng = Jv.get e "latlng" in ignore @@ Jv.call Leaflet.popup "setLatLng" [| lat_lng |]; - ignore @@ Jv.call Leaflet.popup "setContent" [| Jv.of_string "euujjj" |]; + ignore + @@ Jv.call Leaflet.popup "setContent" [| Jv.of_string "create thread here" |]; ignore @@ Jv.call Leaflet.popup "openOn" [| Leaflet.map |]; let lat = Jv.get lat_lng "lat" in