<template>
  <div id="detail1" class="marker-detail" :style="p" @click.stop="false">
    <slot />
  </div>
</template>

<script>
export default {
  name: 'DialogMarkerContainer',
  data() {
    return {
      position: { top: '-999px', left: '-999px' },
    };
  },
  computed: {
    p() {
      return `transform: translate(${this.position.left}, ${this.position.top})`;
    },
  },
  methods: {
    setPosition(position) {
      this.position = {
        top: position.top + (position.offset || 0) + 'px',
        left: position.left + (position.offset || 0) + 'px',
      };
    },
  },
};
</script>

<style lang="scss" scoped>
.marker-detail {
  position: absolute;
  left: 0;
  top: 0;
  cursor: default;
  z-index: 999;
  pointer-events: auto;
}
</style>
