|
52 | 52 | v-if="treeViewItems.length" |
53 | 53 | dense |
54 | 54 | hoverable |
55 | | - activatable |
56 | 55 | color="info" |
57 | 56 | :items="treeViewItems" |
58 | | - @update:active="changeActiveData" |
59 | 57 | > |
60 | 58 | <template #label="{ item }"> |
61 | 59 | <v-badge |
|
68 | 66 | {{ item.name }} |
69 | 67 | </v-badge> |
70 | 68 | </template> |
| 69 | + <template #append="{ item }"> |
| 70 | + <v-tooltip v-if="item.type === 'toponym' || item.children" left> |
| 71 | + <template #activator="{ on, attrs }"> |
| 72 | + <!-- on single feature "Auf Fund zoomen", no heatmap --> |
| 73 | + <v-btn |
| 74 | + :aria-label="$t('plugins.geometrySearch.tooltip.highlight')" |
| 75 | + color="secondary" |
| 76 | + icon |
| 77 | + fab |
| 78 | + x-small |
| 79 | + dark |
| 80 | + v-bind="attrs" |
| 81 | + v-on="on" |
| 82 | + @click="changeActiveData(item)" |
| 83 | + @keypress="changeActiveData(item)" |
| 84 | + > |
| 85 | + <v-icon>fa-map-location-dot</v-icon> |
| 86 | + </v-btn> |
| 87 | + </template> |
| 88 | + <!-- TODO fix font --> |
| 89 | + <span>{{ $t('plugins.geometrySearch.tooltip.highlight') }}</span> |
| 90 | + </v-tooltip> |
| 91 | + <v-tooltip v-if="item.type === 'toponym'" left> |
| 92 | + <template #activator="{ on, attrs }"> |
| 93 | + <v-btn |
| 94 | + :aria-label="$t('plugins.geometrySearch.tooltip.focusSearch')" |
| 95 | + color="secondary" |
| 96 | + icon |
| 97 | + fab |
| 98 | + x-small |
| 99 | + dark |
| 100 | + v-bind="attrs" |
| 101 | + v-on="on" |
| 102 | + @click="fullSearchOnToponym(item)" |
| 103 | + @keypress="fullSearchOnToponym(item)" |
| 104 | + > |
| 105 | + <v-icon>fa-magnifying-glass-arrow-right</v-icon> |
| 106 | + </v-btn> |
| 107 | + </template> |
| 108 | + <span>{{ $t('plugins.geometrySearch.tooltip.focusSearch') }}</span> |
| 109 | + </v-tooltip> |
| 110 | + </template> |
71 | 111 | </v-treeview> |
72 | 112 | <v-card-text v-else> |
73 | 113 | {{ $t('common:plugins.geometrySearch.results.none') }} |
@@ -112,7 +152,10 @@ export default Vue.extend({ |
112 | 152 | }, |
113 | 153 | methods: { |
114 | 154 | ...mapActions('plugin/draw', ['setDrawMode']), |
115 | | - ...mapActions('plugin/geometrySearch', ['changeActiveData']), |
| 155 | + ...mapActions('plugin/geometrySearch', [ |
| 156 | + 'changeActiveData', |
| 157 | + 'fullSearchOnToponym', |
| 158 | + ]), |
116 | 159 | ...mapMutations('plugin/geometrySearch', ['setByCategory']), |
117 | 160 | }, |
118 | 161 | }) |
@@ -149,6 +192,7 @@ export default Vue.extend({ |
149 | 192 | } |
150 | 193 |
|
151 | 194 | .text-locator-result-badge { |
| 195 | + cursor: pointer; |
152 | 196 | max-width: 500px; |
153 | 197 | width: 500px; |
154 | 198 | white-space: normal; |
|
0 commit comments