init () {
    // Hide all grips, etc

    // fixed, needed to work on all found elements, not just first
    const pointGripContainer = getGripContainerMethod()
    const elements = pointGripContainer.querySelectorAll('*')
    Array.prototype.forEach.call(elements, function (el) {
      el.setAttribute('display', 'none')
    })

    const segList = this.elem.pathSegList
    const len = segList.numberOfItems
    this.segs = []
    this.selected_pts = []
    this.first_seg = null

    // Set up segs array
    for (let i = 0; i < len; i++) {
      const item = segList.getItem(i)
      const segment = new Segment(i, item)
      segment.path = this
      this.segs.push(segment)
    }

    const { segs } = this

    let startI = null
    for (let i = 0; i < len; i++) {
      const seg = segs[i]
      const nextSeg = (i + 1) >= len ? null : segs[i + 1]
      const prevSeg = (i - 1) < 0 ? null : segs[i - 1]
      if (seg.type === 2) {
        if (prevSeg && prevSeg.type !== 1) {
          // New sub-path, last one is open,
          // so add a grip to last sub-path's first point
          const startSeg = segs[startI]
          startSeg.next = segs[startI + 1]
          startSeg.next.prev = startSeg
          startSeg.addGrip()
        }
        // Remember that this is a starter seg
        startI = i
      } else if (nextSeg?.type === 1) {
        // This is the last real segment of a closed sub-path
        // Next is first seg after "M"
        seg.next = segs[startI + 1]

        // First seg after "M"'s prev is this
        seg.next.prev = seg
        seg.mate = segs[startI]
        seg.addGrip()
        if (!this.first_seg) {
          this.first_seg = seg
        }
      } else if (!nextSeg) {
        if (seg.type !== 1) {
          // Last seg, doesn't close so add a grip
          // to last sub-path's first point
          const startSeg = segs[startI]
          startSeg.next = segs[startI + 1]
          startSeg.next.prev = startSeg
          startSeg.addGrip()
          seg.addGrip()

          if (!this.first_seg) {
            // Open path, so set first as real first and add grip
            this.first_seg = segs[startI]
          }
        }
      } else if (seg.type !== 1) {
        // Regular segment, so add grip and its "next"
        seg.addGrip()

        // Don't set its "next" if it's an "M"
        if (nextSeg && nextSeg.type !== 2) {
          seg.next = nextSeg
          seg.next.prev = seg
        }
      }
    }
    return this
  }
Reset path data.
@returns {module:path.Path}