src/store/setToolCursor.js
function setToolCursor(element, svgCursor) {
  if (!globalConfiguration.state.showSVGCursors) {
    return;
  }
  // TODO: (state vs options) Exit if cursor wasn't updated
  // TODO: Exit if invalid options to create cursor

  // Note: Max size of an SVG cursor is 128x128, default is 32x32.
  const cursorBlob = svgCursor.getIconWithPointerSVG();
  const mousePoint = svgCursor.mousePoint;

  const svgCursorUrl = window.URL.createObjectURL(cursorBlob);
  element.style.cursor = `url('${svgCursorUrl}') ${mousePoint}, auto`;

  state.svgCursorUrl = svgCursorUrl;
}
function setToolCursor(element, svgCursor) {
  if (!globalConfiguration.state.showSVGCursors) {
    return;
  }
  // TODO: (state vs options) Exit if cursor wasn't updated
  // TODO: Exit if invalid options to create cursor

  // Note: Max size of an SVG cursor is 128x128, default is 32x32.
  const cursorBlob = svgCursor.getIconWithPointerSVG();
  const mousePoint = svgCursor.mousePoint;

  const svgCursorUrl = window.URL.createObjectURL(cursorBlob);
  element.style.cursor = `url('${svgCursorUrl}') ${mousePoint}, auto`;

  state.svgCursorUrl = svgCursorUrl;
}
function setToolCursor ( element , svgCursor ) { if ( ! globalConfiguration . state . showSVGCursors ) { return ; } // TODO: (state vs options) Exit if cursor wasn't updated // TODO: Exit if invalid options to create cursor // Note: Max size of an SVG cursor is 128x128, default is 32x32. const cursorBlob = svgCursor . getIconWithPointerSVG ( ) ; const mousePoint = svgCursor . mousePoint ; const svgCursorUrl = window . URL . createObjectURL ( cursorBlob ) ; element . style . cursor = ` ${ svgCursorUrl } ${ mousePoint } ` ; state . svgCursorUrl = svgCursorUrl ; }
Creates an SVG Cursor for the target element

@param {MouseCursor} svgCursor - The cursor.
Creates an SVG Cursor for the target element