<template>
  <div class="mbmap">
    <div class="cadmap mapshow" :class="isShow?'':'maphide'" @click="onClickMap">
      <div class="close" @click.stop="isShow = !isShow">
        <div class="cline"></div>
        <img :src="require(`@/assets/images/proj2022/icon/back.png`)" alt="" />
      </div>
      <div class="mapbig" :style="{ backgroundImage: `url(${require(`@/assets/images/proj2022/ditu_m.png`)})` }" ></div>
    </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: 0;
  top: 0;
  z-index: 999;
  .mapshow {
    width: 186px;
    height: 120px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 1px;
    backdrop-filter: blur(50px);
    padding: 8px;
    transition: .3s transform ease;
    .close {
      z-index: 99;
      position: absolute;
      background-color: rgba(0, 0, 0, 0.2);
      backdrop-filter: blur(50px);
      cursor: pointer;
      overflow: hidden;
      position: absolute;
      left: -20px;
      top: 0;
      width: 20px;
      display: flex;
      justify-content: center;
      align-items: center;
      height: 30px;
      >div{
        height: 100%;
        width: 2px;
        background: #6EAFEC;
      }
      > img {
        width: 8px;
        margin-left: 4px;
      }
    }
    .mapbig {
      width: 100%;
      height: 100%;
      background-size: auto 100%;
      background-repeat: no-repeat;
      background-position: center center;
      background-color: rgba(0, 0, 0, 0.2);
    }
  }
  .maphide {
   transform: translateX(186px);
    .close {
      > img {
        width: 8px;
        margin-left: 4px;
        transform: rotate(180deg);
      }
    }
  }

}
</style>