<template>
  <div class="mbmap">
    <div class="mapshow cadmap" @click="onClickMap" v-if="isShow">
      <div class="close" @click.stop="isShow = false">
        <img :src="require(`@/assets/images/proj2022/mobile/cancel@2x.png`)" alt="" />
      </div>
      <div class="mapbig" :style="{ backgroundImage: `url(${require(`@/assets/images/proj2022/ditu.png`)})` }" ></div>
    </div>
    <div class="mapthumb" @click="isShow = true" v-else>
      <img :src="require(`@/assets/images/proj2022/mobile/map@2x.png`)" alt="" />
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      isShow: true,
    };
  },
  methods: {
    onClickMap() {
      window.player.director.changeMode("floorplan");
    },
  },
};
</script>

<style lang="less" scoped>
.mbmap {
  position: fixed;
  right: 10px;
  top: 8px;
  overflow: hidden;
  z-index: 999;
  .mapshow {
    width: 166px;
    height: 120px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1px;
    backdrop-filter: blur(50px);
    padding: 8px;
    .close {
      z-index: 99;
      position: absolute;
      background-color: rgba(0, 0, 0, 0.4);
      border-radius: 50%;
      cursor: pointer;
      height: 60px;
      overflow: hidden;
      position: absolute;
      right: -30px;
      top: -30px;
      width: 60px;
      > img {
        position: absolute;
        bottom: 12px;
        left: 12px;
        width: 12px;
      }
    }
    .mapbig {
      width: 100%;
      height: 100%;
      background-size: auto 116%;
      background-repeat: no-repeat;
      background-position: center center;
      background-color: rgba(0, 0, 0, 0.2);
    }
  }
  .mapthumb {
    width: 44px;
    height: 44px;
    .cad{
      visibility: hidden;
    }
    > img {
      width: 100%;
      height: 100%;
    }
  }

}
</style>