Skip to content

Commit

Permalink
fix map action button tooltips
Browse files Browse the repository at this point in the history
Signed-off-by: Vinzenz Rosenkranz <[email protected]>
  • Loading branch information
v1r0x committed Nov 27, 2024
1 parent 7a878c3 commit 22b6f27
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 30 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ All notable changes to this project will be documented in this file.
## 0.11 - ???
### Fixed
- _Map Action Button_ position
- _Map Action Button_ tooltips

## 0.10.1
### Added
Expand Down
62 changes: 32 additions & 30 deletions resources/js/components/map/InteractiveMap.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
class="btn btn-fab rounded-circle"
:class="{'btn-primary': actionState.drawType == 'Point', 'btn-outline-primary': actionState.drawType != 'Point'}"
data-bs-toggle="popover"
:data-content="t('main.map.draw.point.desc')"
data-trigger="hover"
data-placement="bottom"
:data-bs-content="t('main.map.draw.point.desc')"
data-bs-trigger="hover"
data-bs-placement="bottom"
@click="toggleDrawType('Point')"
>
<i class="fas fa-fw fa-map-marker-alt" />
Expand All @@ -26,9 +26,9 @@
class="btn btn-fab rounded-circle"
:class="{'btn-primary': actionState.drawType == 'LineString', 'btn-outline-primary': actionState.drawType != 'LineString'}"
data-bs-toggle="popover"
:data-content="t('main.map.draw.linestring.desc')"
data-trigger="hover"
data-placement="bottom"
:data-bs-content="t('main.map.draw.linestring.desc')"
data-bs-trigger="hover"
data-bs-placement="bottom"
@click="toggleDrawType('LineString')"
>
<i class="fas fa-fw fa-road" />
Expand All @@ -38,9 +38,9 @@
class="btn btn-fab rounded-circle"
:class="{'btn-primary': actionState.drawType == 'Polygon', 'btn-outline-primary': actionState.drawType != 'Polygon'}"
data-bs-toggle="popover"
:data-content="t('main.map.draw.polygon.desc')"
data-trigger="hover"
data-placement="bottom"
:data-bs-content="t('main.map.draw.polygon.desc')"
data-bs-trigger="hover"
data-bs-placement="bottom"
@click="toggleDrawType('Polygon')"
>
<i class="fas fa-fw fa-draw-polygon" />
Expand All @@ -50,9 +50,9 @@
type="button"
class="btn btn-fab rounded-circle btn-outline-info"
data-bs-toggle="popover"
:data-content="t('main.map.draw.modify.desc')"
data-trigger="hover"
data-placement="bottom"
:data-bs-content="t('main.map.draw.modify.desc')"
data-bs-trigger="hover"
data-bs-placement="bottom"
@click="setInteractionMode('modify')"
>
<i class="fas fa-fw fa-edit" />
Expand All @@ -62,9 +62,9 @@
type="button"
class="btn btn-fab rounded-circle btn-outline-success"
data-bs-toggle="popover"
:data-content="t('main.map.draw.modify.pos_desc')"
data-trigger="hover"
data-placement="bottom"
:data-bs-content="t('main.map.draw.modify.pos_desc')"
data-bs-trigger="hover"
data-bs-placement="bottom"
@click="updateFeatures()"
>
<i class="fas fa-fw fa-check" />
Expand All @@ -74,9 +74,9 @@
type="button"
class="btn btn-fab rounded-circle btn-outline-danger"
data-bs-toggle="popover"
:data-content="t('main.map.draw.modify.neg_desc')"
data-trigger="hover"
data-placement="bottom"
:data-bs-content="t('main.map.draw.modify.neg_desc')"
data-bs-trigger="hover"
data-bs-placement="bottom"
@click="updateFeatures(false)"
>
<i class="fas fa-fw fa-times" />
Expand All @@ -86,9 +86,9 @@
type="button"
class="btn btn-fab rounded-circle btn-outline-danger"
data-bs-toggle="popover"
:data-content="t('main.map.draw.delete.desc')"
data-trigger="hover"
data-placement="bottom"
:data-bs-content="t('main.map.draw.delete.desc')"
data-bs-trigger="hover"
data-bs-placement="bottom"
@click="setInteractionMode('delete')"
>
<i class="fas fa-fw fa-trash" />
Expand All @@ -98,9 +98,9 @@
type="button"
class="btn btn-fab rounded-circle btn-outline-success"
data-bs-toggle="popover"
:data-content="t('main.map.draw.delete.pos_desc')"
data-trigger="hover"
data-placement="bottom"
:data-bs-content="t('main.map.draw.delete.pos_desc')"
data-bs-trigger="hover"
data-bs-placement="bottom"
@click="deleteFeatures()"
>
<i class="fas fa-fw fa-check" />
Expand All @@ -110,9 +110,9 @@
type="button"
class="btn btn-fab rounded-circle btn-outline-danger"
data-bs-toggle="popover"
:data-content="t('main.map.draw.delete.neg_desc')"
data-trigger="hover"
data-placement="bottom"
:data-bs-content="t('main.map.draw.delete.neg_desc')"
data-bs-trigger="hover"
data-bs-placement="bottom"
@click="deleteFeatures(false)"
>
<i class="fas fa-fw fa-times" />
Expand All @@ -122,9 +122,9 @@
class="btn btn-fab rounded-circle"
:class="{'btn-primary': actionState.measure.active, 'btn-outline-primary': !actionState.measure.active}"
data-bs-toggle="popover"
:data-content="t('main.map.draw.measure.desc')"
data-trigger="hover"
data-placement="bottom"
:data-bs-content="t('main.map.draw.measure.desc')"
data-bs-trigger="hover"
data-bs-placement="bottom"
@click="toggleMeasurements()"
>
<i class="fas fa-fw fa-ruler-combined" />
Expand Down Expand Up @@ -1466,6 +1466,8 @@
updateLayerGroups();
initializeDrawFeatures();
initializeMapEvents();
document.querySelectorAll('[data-bs-toggle="popover"]').forEach(popoverTriggerEl => new bootstrap.Popover(popoverTriggerEl));
});
});
Expand Down

0 comments on commit 22b6f27

Please sign in to comment.