fixed arrows

This commit is contained in:
Fedor Katurov 2020-01-16 16:59:09 +07:00
parent bdcd7fd814
commit 973f934614
2 changed files with 31 additions and 20 deletions

View file

@ -87,12 +87,12 @@ class KmMarksLayer extends LayerGroup {
interactive: false,
icon: divIcon({
html: `
<div class="leaflet-km-dist" style="transform: translate(-50%, -50%) rotate(${allwaysPositiveAngleDeg(
angle
)}deg);">
<div
class="leaflet-km-dist ${allwaysPositiveAngleDeg(angle) !== angle ? 'reverse' : ''}"
style="transform: translate(-50%, -50%) rotate(${allwaysPositiveAngleDeg(angle)}deg);"
>
${distance}
<svg width="48" height="48" preserveAspectRatio="xMidYMid">
<svg width="48" height="48" preserveAspectRatio="xMidYMid" transform="rotate(0deg)">
<image xlink:href="${arrow_image}" x="0" y="0" width="48" height="48"/>
</svg>
</div>