constructor (elem) {
    if (!elem || elem.tagName !== 'path') {
      throw new Error('svgedit.path.Path constructed without a <path> element')
    }

    this.elem = elem
    this.segs = []
    this.selected_pts = []
    svgCanvas.setPathObj(this)
    // path = this;

    this.init()
  }
@param {SVGPathElement} elem
@throws {Error} If constructed without a path element