deleteCurrentLayer = () => {
  const { BatchCommand, RemoveElementCommand } = svgCanvas.history
  let currentLayer = svgCanvas.getCurrentDrawing().getCurrentLayer()
  const { nextSibling } = currentLayer
  const parent = currentLayer.parentNode
  currentLayer = svgCanvas.getCurrentDrawing().deleteCurrentLayer()
  if (currentLayer) {
    const batchCmd = new BatchCommand('Delete Layer')
    // store in our Undo History
    batchCmd.addSubCommand(
      new RemoveElementCommand(currentLayer, nextSibling, parent)
    )
    svgCanvas.addCommandToHistory(batchCmd)
    svgCanvas.clearSelection()
    svgCanvas.call('changed', [parent])
    return true
  }
  return false
}
Deletes the current layer from the drawing and then clears the selection. This function
then calls the 'changed' handler. This is an undoable action.
@function module:draw.deleteCurrentLayer
@fires module:svgcanvas.SvgCanvas#event:changed
@returns {boolean} `true` if an old layer group was found to delete