Skip to content

Commit

Permalink
Add icon tooltips, no layers text, and adjusted spacing for ActiveLay…
Browse files Browse the repository at this point in the history
…ers component
  • Loading branch information
annehaley committed Oct 3, 2023
1 parent 7f80b24 commit 30bd4c3
Showing 1 changed file with 30 additions and 9 deletions.
39 changes: 30 additions & 9 deletions web/src/components/map/ActiveLayers.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,25 +74,46 @@ function setCurrentMapDataSource(layerId: string) {
no-click-animation
:close-on-content-click="false"
location="bottom"
class="mx-2"
>
<template v-slot:activator="{ props }">
<v-btn icon v-bind="props">
<v-btn icon v-bind="props" class="mx-2">
<v-icon>mdi-layers</v-icon>
</v-btn>
</template>
<v-card rounded="lg" class="mt-2">
<v-card-title>
<v-card-title style="min-width: 250px">
Active Layers
<v-icon @click="clearActiveLayers">mdi-playlist-remove</v-icon>
<v-tooltip
v-if="activeMapLayerIds.length"
text="Remove All Layers"
location="bottom"
>
<template v-slot:activator="{ props }">
<v-icon
v-bind="props"
@click="clearActiveLayers"
style="float: right"
>mdi-playlist-remove</v-icon
>
</template>
</v-tooltip>
</v-card-title>
<draggable
v-model="activeMapLayerIds"
@change="updateVisibleLayers"
:item-key="(e: string) => e"
>
<div v-if="!activeMapLayerIds.length" class="pa-4">No layers active.</div>
<draggable v-model="activeMapLayerIds" @change="updateVisibleLayers">
<template #item="{ element }">
<v-card class="px-3 py-1">
<v-icon>mdi-drag-horizontal-variant</v-icon>
<v-tooltip
v-if="activeMapLayerIds.length"
text="Reorder Layers"
location="bottom"
>
<template v-slot:activator="{ props }">
<v-icon v-bind="props" @click="clearActiveLayers"
>mdi-drag-horizontal-variant</v-icon
>
</template>
</v-tooltip>

{{ getLayerName(element) }}

Expand Down

0 comments on commit 30bd4c3

Please sign in to comment.