Answer the question
In order to leave comments, you need to log in
How to hide all points on the map when clicking on 1 of them?
Good evening! I have something like this
<div
class="point_wrap"
:style="{
left: point.map_x + '%',
top: point.map_y + '%'
}"
>
<div class="point" @click="tooltipToggle"></div>
<div class="pointTooltip" v-if="tooltipVisible">
<div class="pointTooltipTitle">{{ point.name }}</div>
<a
href=""
class="pointTooltipGo"
@click.prevent="openPanorama"
>Начать прохождение</a>
</div>
</div>
export default {
data(){
return {
tooltipVisible: false
};
},
methods: {
tooltipToggle(){
this.tooltipVisible = !this.tooltipVisible;
}
}
}
Answer the question
In order to leave comments, you need to log in
Yes, do it. When a point is clicked, it generates an event; in the parent, the handler hides everything except this point.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question