setRectRadiusMethod = (val) => {
  const { ChangeElementCommand } = svgCanvas.history
  const selectedElements = svgCanvas.getSelectedElements()
  const selected = selectedElements[0]
  if (selected?.tagName === 'rect') {
    const r = Number(selected.getAttribute('rx'))
    if (r !== val) {
      selected.setAttribute('rx', val)
      selected.setAttribute('ry', val)
      svgCanvas.addCommandToHistory(new ChangeElementCommand(selected, { rx: r, ry: r }, 'Radius'))
      svgCanvas.call('changed', [selected])
    }
  }
}
Sets the `rx` and `ry` values to the selected `rect` element
to change its corner radius.
@function module:svgcanvas.SvgCanvas#setRectRadius
@param {string|Float} val - The new radius
@fires module:svgcanvas.SvgCanvas#event:changed
@returns {void}