clearSelectionMethod = (noCall) => {
  const selectedElements = svgCanvas.getSelectedElements()
  selectedElements.forEach((elem) => {
    if (!elem) {
      return
    }

    svgCanvas.selectorManager.releaseSelector(elem)
  })
  svgCanvas?.setEmptySelectedElements()

  if (!noCall) {
    svgCanvas.call('selected', svgCanvas.getSelectedElements())
  }
}
Clears the selection. The 'selected' handler is then optionally called.
This should really be an intersection applying to all types rather than a union.
@name module:selection.SvgCanvas#clearSelection
@type {module:draw.DrawCanvasInit#clearSelection|module:path.EditorContext#clearSelection}
@fires module:selection.SvgCanvas#event:selected