parsePCanvasCursorFromCSSCursor function
Implementation
PCanvasCursor parsePCanvasCursorFromCSSCursor(String? cssCursor) {
if (cssCursor == null) return PCanvasCursor.cursor;
cssCursor = cssCursor.trim().toLowerCase();
switch (cssCursor) {
case '':
return PCanvasCursor.cursor;
case 'pointer':
return PCanvasCursor.pointer;
case 'grab':
return PCanvasCursor.grab;
case 'crosshair':
return PCanvasCursor.crosshair;
case 'text':
return PCanvasCursor.text;
case 'wait':
return PCanvasCursor.wait;
case 'zoom-in':
return PCanvasCursor.zoomIn;
case 'zoom-out':
return PCanvasCursor.zoomOut;
default:
return PCanvasCursor.cursor;
}
}