mirror of
https://gitlab.com/mrubli/hugo-mod-leaflet.git
synced 2025-10-07 10:04:24 +00:00
layouts: scale: Add position parameter
This commit is contained in:
@@ -50,7 +50,9 @@ Track options:
|
|||||||
|
|
||||||
Scale options:
|
Scale options:
|
||||||
|
|
||||||
(none)
|
position:
|
||||||
|
Position of the scale. One of: "topleft", "topright", "bottomleft", "bottomright"
|
||||||
|
Optional, defaults to "bottomright".
|
||||||
|
|
||||||
Elevation profile options:
|
Elevation profile options:
|
||||||
|
|
||||||
|
@@ -5,5 +5,10 @@
|
|||||||
{{ $uniqueMapId := .Parent.Ordinal | safeJS }}
|
{{ $uniqueMapId := .Parent.Ordinal | safeJS }}
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
map_options_{{ $uniqueMapId }}.scale = { enabled: true };
|
map_options_{{ $uniqueMapId }}.scale = {
|
||||||
|
enabled: true,
|
||||||
|
{{ with .Get "position" }}
|
||||||
|
position: {{ . }},
|
||||||
|
{{ end }}
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
|
Reference in New Issue
Block a user