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,
|
useAppSelector,
|
||||||
} from '../../../../app/store';
|
} from '../../../../app/store';
|
||||||
import { roundToMultiple } from '../../../../common/util/roundDownToMultiple';
|
import { roundToMultiple } from '../../../../common/util/roundDownToMultiple';
|
||||||
|
import { stageRef } from '../InpaintingCanvas';
|
||||||
import {
|
import {
|
||||||
InpaintingState,
|
InpaintingState,
|
||||||
setBoundingBoxCoordinate,
|
setBoundingBoxCoordinate,
|
||||||
@ -107,6 +108,15 @@ const InpaintingBoundingBoxPreview = () => {
|
|||||||
transformerRef.current.getLayer()?.batchDraw();
|
transformerRef.current.getLayer()?.batchDraw();
|
||||||
}, [shouldLockBoundingBox]);
|
}, [shouldLockBoundingBox]);
|
||||||
|
|
||||||
|
useEffect(
|
||||||
|
() => () => {
|
||||||
|
const container = stageRef.current?.container();
|
||||||
|
if (!container) return;
|
||||||
|
container.style.cursor = 'none';
|
||||||
|
},
|
||||||
|
[shouldLockBoundingBox]
|
||||||
|
);
|
||||||
|
|
||||||
const scaledStep = 64 * stageScale;
|
const scaledStep = 64 * stageScale;
|
||||||
|
|
||||||
const handleOnDragMove = useCallback(
|
const handleOnDragMove = useCallback(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user