diff --git a/litmus/features/window/resize-cursor.js b/litmus/features/window/resize-cursor.js new file mode 100644 index 000000000..a0759bbe5 --- /dev/null +++ b/litmus/features/window/resize-cursor.js @@ -0,0 +1,20 @@ +import { Window } from "cx/widgets"; + +// The resize cursor should show up on the window edges and be cleared on the way back in, falling back to +// pointer (from the draggable CSS class) on the left and crosshair (from the inline style) on the right. + +export default ( + + + + +); diff --git a/litmus/index.js b/litmus/index.js index f3ecdd461..eb81a6ec2 100644 --- a/litmus/index.js +++ b/litmus/index.js @@ -139,7 +139,8 @@ import "./index.scss"; //import Demo from "./features/grid/CellEditing"; // import Demo from "./features/charts/PointReducer"; // import Demo from "./features/charts/line-graph/LineGraph"; -import Demo from "./features/charts/line-graph/SmoothingOvershoot"; +// import Demo from "./features/charts/line-graph/SmoothingOvershoot"; +import Demo from "./features/window/resize-cursor"; // import Demo from "./bugs/GridDefaultSortFieldClearableSortIssue"; // import Demo from "./bugs/GridFixedColumnsFixedHeaderColumnsPosition"; // import Demo from "./bugs/GridOnFetchRecords"; diff --git a/packages/cx/src/widgets/overlay/Overlay.tsx b/packages/cx/src/widgets/overlay/Overlay.tsx index 2cbc215f2..065a52cf2 100644 --- a/packages/cx/src/widgets/overlay/Overlay.tsx +++ b/packages/cx/src/widgets/overlay/Overlay.tsx @@ -765,9 +765,11 @@ export class OverlayComponent< widget.handleResize(e, instance, this); } else { let prefix = this.getResizePrefix(e); - this.setCustomStyle({ - cursor: prefix ? prefix + "-resize" : undefined, - }); + if (prefix) this.setCustomStyle({ cursor: `${prefix}-resize` }); + else if (this.customStyle.cursor) { + delete this.customStyle.cursor; + if (this.el) this.el.style.cursor = data.style?.cursor ?? ""; + } } }