createLayer = (name, hrService) => {
  const newLayer = svgCanvas
    .getCurrentDrawing()
    .createLayer(name, historyRecordingService(hrService))
  svgCanvas.clearSelection()
  svgCanvas.call('changed', [newLayer])
}
Creates a new top-level layer in the drawing with the given name, sets the current layer
to it, and then clears the selection. This function then calls the 'changed' handler.
This is an undoable action.
@function module:draw.createLayer
@param {string} name - The given name
@param {module:history.HistoryRecordingService} hrService
@fires module:svgcanvas.SvgCanvas#event:changed
@returns {void}