mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Fixes bug with bounding box transforming cursor
This commit is contained in:
parent
52e74fef7c
commit
c0c32d9daa
@ -12,6 +12,7 @@ import {
|
||||
useAppSelector,
|
||||
} from '../../../../app/store';
|
||||
import { roundToMultiple } from '../../../../common/util/roundDownToMultiple';
|
||||
import { stageRef } from '../InpaintingCanvas';
|
||||
import {
|
||||
InpaintingState,
|
||||
setBoundingBoxCoordinate,
|
||||
@ -107,6 +108,15 @@ const InpaintingBoundingBoxPreview = () => {
|
||||
transformerRef.current.getLayer()?.batchDraw();
|
||||
}, [shouldLockBoundingBox]);
|
||||
|
||||
useEffect(
|
||||
() => () => {
|
||||
const container = stageRef.current?.container();
|
||||
if (!container) return;
|
||||
container.style.cursor = 'none';
|
||||
},
|
||||
[shouldLockBoundingBox]
|
||||
);
|
||||
|
||||
const scaledStep = 64 * stageScale;
|
||||
|
||||
const handleOnDragMove = useCallback(
|
||||
|
Loading…
Reference in New Issue
Block a user