import Konva from "konva";

export default function (width,height){
  const x=width*0.495,y=260,_width=width*0.186,_height=height*0.713
  const container=new Konva.Group({
    id:'sb',
    x:x,
    y:y,
    width:_width,
    height:_height
  })

  const imageObj = new Image();
  imageObj.src = require('@/assets/sliao/personbg.png');
  imageObj.onload = function () {
    const shape = new Konva.Image({
      x: 0,
      y: 0,
      width: _width,
      height:_height,
      image: this,
    });
    container.add(shape)
    shape.zIndex(0)
  }

  const text=new Konva.Text({
    x: 0,
    y: 0,
    width: _width,
    height:_height,
    fill:'black',
    text:'划线设备',
    align:'center',
    verticalAlign:'middle',
  })

  container.add(text)

  return container
}
