Skip to content

Commit

Permalink
Change variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
piazzai committed Oct 10, 2023
1 parent 438db5f commit d89964f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion _data/locations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ areas:
- text:
- This is a tooltip with no title...
- ...and with multiple lines of text
latlngs:
latlng:
- 47.81025552661079, 19.02201563177881
- 47.80993848992647, 19.024740756084967
- 47.812863800415236, 19.026607573523037
Expand Down
4 changes: 2 additions & 2 deletions assets/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ L.marker([{{ marker.latlng }}])

{% if site.data.locations.areas %}
{% for area in site.data.locations.areas %}
{% assign latlngs = area.latlngs | join: '],[' | prepend: '[' | append: ']' %}
{% assign latlng = area.latlng | join: '],[' | prepend: '[' | append: ']' %}
{% assign color = area.color | default: '#ff6b6b' %}
{% assign offset = area.offset | default: '0, 0' %}
{% assign x = offset | split: ', ' | first %}
Expand All @@ -49,7 +49,7 @@ L.marker([{{ marker.latlng }}])
{% assign content = line %}
{% endif %}
{% endfor %}
L.polygon([{{ latlngs }}], {color: '{{ color }}'})
L.polygon([{{ latlng }}], {color: '{{ color }}'})
{% if content %}
.addTo(map)
.bindTooltip("{{ content }}", {direction: 'center', offset: L.point({x: {{ x }}, y: {{ y }}})});
Expand Down
2 changes: 1 addition & 1 deletion demo/_data/locations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ areas:
- text:
- This is a tooltip with no title...
- ...and with multiple lines of text
latlngs:
latlng:
- 47.81025552661079, 19.02201563177881
- 47.80993848992647, 19.024740756084967
- 47.812863800415236, 19.026607573523037
Expand Down

0 comments on commit d89964f

Please sign in to comment.