mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
fix(ui): image metadata viewer stuck when spamming hotkey
This commit is contained in:
parent
886f5c90a3
commit
e8d60e8d83
@ -103,24 +103,11 @@ const CurrentImagePreview = ({
|
|||||||
dataTestId="image-preview"
|
dataTestId="image-preview"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<AnimatePresence>
|
|
||||||
{shouldShowImageDetails && imageDTO && withMetadata && (
|
{shouldShowImageDetails && imageDTO && withMetadata && (
|
||||||
<Box
|
<Box position="absolute" opacity={0.8} top={0} width="full" height="full" borderRadius="base">
|
||||||
as={motion.div}
|
|
||||||
key="metadataViewer"
|
|
||||||
initial={initial}
|
|
||||||
animate={animateMetadata}
|
|
||||||
exit={exit}
|
|
||||||
position="absolute"
|
|
||||||
top={0}
|
|
||||||
width="full"
|
|
||||||
height="full"
|
|
||||||
borderRadius="base"
|
|
||||||
>
|
|
||||||
<ImageMetadataViewer image={imageDTO} />
|
<ImageMetadataViewer image={imageDTO} />
|
||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</AnimatePresence>
|
|
||||||
<AnimatePresence>
|
<AnimatePresence>
|
||||||
{withNextPrevButtons && shouldShowNextPrevButtons && imageDTO && (
|
{withNextPrevButtons && shouldShowNextPrevButtons && imageDTO && (
|
||||||
<Box
|
<Box
|
||||||
@ -152,10 +139,6 @@ const animateArrows: AnimationProps['animate'] = {
|
|||||||
opacity: 1,
|
opacity: 1,
|
||||||
transition: { duration: 0.07 },
|
transition: { duration: 0.07 },
|
||||||
};
|
};
|
||||||
const animateMetadata: AnimationProps['animate'] = {
|
|
||||||
opacity: 0.8,
|
|
||||||
transition: { duration: 0.07 },
|
|
||||||
};
|
|
||||||
const exit: AnimationProps['exit'] = {
|
const exit: AnimationProps['exit'] = {
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
transition: { duration: 0.07 },
|
transition: { duration: 0.07 },
|
||||||
|
Loading…
Reference in New Issue
Block a user