diff --git a/app/src/components/model/board/shapes/ComponentLabel.js b/app/src/components/model/board/shapes/ComponentLabel.js index d95dcedf..88564881 100644 --- a/app/src/components/model/board/shapes/ComponentLabel.js +++ b/app/src/components/model/board/shapes/ComponentLabel.js @@ -76,7 +76,7 @@ export function ComponentLabel({ }} onMouseLeave={() => { if (!readOnly) { - document.body.style.cursor = "pointer"; + document.body.style.cursor = "default"; } }} /> diff --git a/app/src/components/model/board/shapes/withComponentContainer.js b/app/src/components/model/board/shapes/withComponentContainer.js index 2d3ebd28..35509653 100644 --- a/app/src/components/model/board/shapes/withComponentContainer.js +++ b/app/src/components/model/board/shapes/withComponentContainer.js @@ -35,28 +35,14 @@ export default function withComponentContainer(Entity, type, includeIndicator) { const [isHovered, setHovered] = useState(); - // -------------------------------------------------------------------------- - // Event handlers - // -------------------------------------------------------------------------- - - function onMouseEnter() { - document.body.style.cursor = "pointer"; - setHovered(true); - } - - function onMouseLeave() { - document.body.style.cursor = "default"; - setHovered(false); - } - return ( onMouseEnter()} - onMouseLeave={() => onMouseLeave()} + onMouseEnter={() => setHovered(true)} + onMouseLeave={() => setHovered(false)} onDragStart={onDragStart} onDragMove={onDragMove} onDragEnd={onDragEnd}