<template>
  <div :style="customStyle"  class="zero-custom-cmp zero-custom-node">
    <p class="custom-node-html" v-if="selfText">{{selfText}}</p>
    <slot></slot>
  </div>
</template>

<style lang="scss">
.zero-custom-cmp{
  position: absolute;
  box-sizing: border-box;
  .custom-node-html{
    position: absolute;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
  }
}
</style>

<script>
	import events from "@/global-events.js"

export default {
  name: 'customNode',
  props: {
    customStyle: {
      type: String,
      default: ''
    },
    properties: {
      type: Object,
      default: () => {}
    },
    view: {
      type: Object,
      default: () => {}
    }
  },
  computed: {
    selfText() {
      return this.properties ? '' || '' : '';
      //return this.properties ? this.properties.text || '' : '';
    }
  },
  methods: {
    clickViewHandle(e) {
      console.log("click",e.offsetX)
      // events.$emit("onClickTouchLayer",e);
		//	this.$store.dispatch('activeComponent', {data, fromPlayground: true});
    }
  }
};
</script>
