mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): improve dragging activation
- delay of 250ms - prevent gallery images from accidentally activating native drag and drop
This commit is contained in:
parent
de0fd87035
commit
0843028e6e
@ -40,11 +40,11 @@ const ImageDndContext = (props: ImageDndContextProps) => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const mouseSensor = useSensor(MouseSensor, {
|
const mouseSensor = useSensor(MouseSensor, {
|
||||||
activationConstraint: { distance: 15 },
|
activationConstraint: { delay: 250, tolerance: 5 },
|
||||||
});
|
});
|
||||||
|
|
||||||
const touchSensor = useSensor(TouchSensor, {
|
const touchSensor = useSensor(TouchSensor, {
|
||||||
activationConstraint: { distance: 15 },
|
activationConstraint: { delay: 250, tolerance: 5 },
|
||||||
});
|
});
|
||||||
// TODO: Use KeyboardSensor - needs composition of multiple collisionDetection algos
|
// TODO: Use KeyboardSensor - needs composition of multiple collisionDetection algos
|
||||||
// Alternatively, fix `rectIntersection` collection detection to work with the drag overlay
|
// Alternatively, fix `rectIntersection` collection detection to work with the drag overlay
|
||||||
|
@ -279,6 +279,7 @@ const HoverableImage = memo((props: HoverableImageProps) => {
|
|||||||
objectFit={
|
objectFit={
|
||||||
shouldUseSingleGalleryColumn ? 'contain' : galleryImageObjectFit
|
shouldUseSingleGalleryColumn ? 'contain' : galleryImageObjectFit
|
||||||
}
|
}
|
||||||
|
draggable={false}
|
||||||
rounded="md"
|
rounded="md"
|
||||||
src={thumbnail_url || image_url}
|
src={thumbnail_url || image_url}
|
||||||
fallback={<FaImage />}
|
fallback={<FaImage />}
|
||||||
|
Loading…
Reference in New Issue
Block a user