aboutsummaryrefslogtreecommitdiff
path: root/src/View/Map/Icon.ml
diff options
context:
space:
mode:
authorJoris2022-07-05 21:55:41 +0200
committerJoris2023-01-28 09:35:55 +0100
commit063d8ef9eaf874a941f4459e831057dd0a1b7ddd (patch)
treec4a8b27cb8fdb5d1dc26c560c7483c9593f40dac /src/View/Map/Icon.ml
parent2936f06576997bffe7903ea840df563a408efc21 (diff)
downloadmap-main.tar.gz
map-main.tar.bz2
map-main.zip
Rewrite in TSmain
Diffstat (limited to 'src/View/Map/Icon.ml')
-rw-r--r--src/View/Map/Icon.ml32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/View/Map/Icon.ml b/src/View/Map/Icon.ml
deleted file mode 100644
index 8737f43..0000000
--- a/src/View/Map/Icon.ml
+++ /dev/null
@@ -1,32 +0,0 @@
-let create name color =
- let c = Color.from_raw color in
- let crBlack = Color.contrast_ratio { r = 0.; g = 0.; b = 0. } c in
- let crWhite = Color.contrast_ratio { r = 255.; g = 255.; b = 255. } c in
- let textCol = if crBlack > crWhite then "black" else "white" in
- Leaflet.div_icon
- { className = ""
- ; popupAnchor = [| 0.; -34. |]
- ; html =
- H.div
- [| HA.class_ "g-Marker" |]
- [| H.div
- [| HA.class_ "g-Marker__Round"
- ; HA.style ("background-color: " ^ color)
- |]
- [| |]
- ; H.div [| HA.class_ "g-Marker__PeakBorder" |] [| |]
- ; H.div
- [| HA.class_ "g-Marker__PeakInner"
- ; HA.style ("border-top-color: " ^ color)
- |]
- [| |]
- ; H.div
- [| HA.class_ "g-Marker__Icon" |]
- [| H.i
- [| HA.class_ ("fa fa-" ^ name)
- ; HA.style ("color: " ^ textCol)
- |]
- [| |]
- |]
- |]
- }