setMode (name) {
    this.pathActions.clear(true)
    this.textActions.clear()
    this.curProperties =
      this.selectedElements[0]?.nodeName === 'text'
        ? this.curText
        : this.curShape
    this.currentMode = name

    // fires modeChange event for the editor
    if (this.modeEvent) {
      document.dispatchEvent(this.modeEvent)
    }
  }
Sets the editor's mode to the given string.
@function module:svgcanvas.SvgCanvas#setMode
@param {string} name - String with the new mode to change to
@returns {void}