Skip to content

Commit

Permalink
fix: dom management conflicts in custom markers
Browse files Browse the repository at this point in the history
  • Loading branch information
HusamElbashir committed Jun 27, 2022
1 parent 1d6e269 commit f8f6bef
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions src/components/CustomMarker.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
<template>
<div
ref="customMarkerRef"
v-if="hasSlotContent"
class="custom-marker-content"
:style="{ cursor: !!$attrs.onClick ? 'pointer' : undefined }"
>
<slot />
<div v-if="hasSlotContent" class="custom-marker-wrapper">
<div ref="customMarkerRef" :style="{ cursor: !!$attrs.onClick ? 'pointer' : undefined }">
<slot />
</div>
</div>
</template>

Expand Down Expand Up @@ -41,11 +38,11 @@ export default defineComponent({
</script>

<style scoped>
.custom-marker-content {
.custom-marker-wrapper {
display: none;
}
.mapdiv .custom-marker-content {
.mapdiv .custom-marker-wrapper {
display: inline-block;
}
</style>

0 comments on commit f8f6bef

Please sign in to comment.