<template>
  <div class="map-menu" :style="style">
    <img @click="$emit('in')" src="@/assets/images/zoomin.png"/>
    <img @click="$emit('out')" src="@/assets/images/zoomout.png"/>
    <img @click="$emit('full')" src="@/assets/images/full.png"/>
  </div>
</template>

<script>
export default {
  name: 'MapMenu',
  props: {
    full: {
      type: Boolean,
      default: false,
    }
  },
  computed: {
    style() {
      if (this.full) {
        return {
          left: '25%',
          bottom: '23%',
        }
      }
      return {
        left: '1%',
        bottom: '1%',
      }
    }
  }
}
</script>

<style lang="stylus" scoped>
.map-menu
  position fixed
  display flex
  flex-direction column
  z-index 1000
  transition all .5s
  img
    width 2.4rem
    height @width
    margin-bottom 0.3rem
    cursor pointer
    transition transform .3s
    &:hover
      transform scale(1.5)
</style>
