diff options
Diffstat (limited to 'src/View/Map')
-rw-r--r-- | src/View/Map/Marker.ml | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/src/View/Map/Marker.ml b/src/View/Map/Marker.ml index c628c3a..1c0c0d6 100644 --- a/src/View/Map/Marker.ml +++ b/src/View/Map/Marker.ml @@ -18,7 +18,12 @@ let form on_validate colors init_name init_color init_icon = |] [| Layout.section [| |] - [| Form.input "g-MarkerForm__Name" "Name" init_name (fun newName -> name := newName) + [| Form.input + "g-MarkerForm__Name" + "Name" + [| HE.on_input (fun e -> name := (Element.value (Event.target e))) + ; HA.value init_name + |] ; Form.color_input colors "g-MarkerForm__Color" "Color" init_color (fun newColor -> color := newColor) ; H.div [| HA.class_ "g-Form__Field" |] @@ -30,10 +35,11 @@ let form on_validate colors init_name init_color init_icon = |] ; let dom_icon = H.div [| HA.class_ ("fa fa-" ^ !icon) |] [| |] in Layout.line - [| |] - [| H.div [| HA.class_ "g-MarkerForm__Icon" |] [| dom_icon |] - ; Autocomplete.create - [| HA.value init_icon |] + [| HA.class_ "g-MarkerForm__AutocompleteAndIcon" |] + [| Autocomplete.create + [| HA.value init_icon + ; HA.class_ "g-MarkerForm__Autocomplete" + |] "g-MarkerForm__IconInput" FontAwesome.icons (fun icon -> @@ -45,6 +51,7 @@ let form on_validate colors init_name init_color init_icon = (fun newIcon -> let () = icon := newIcon in Element.set_class_name dom_icon ("fa fa-" ^ newIcon)) + ; H.div [| HA.class_ "g-MarkerForm__Icon" |] [| dom_icon |] |] |] |] |