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"
|
||||
/>
|
||||
)}
|
||||
<AnimatePresence>
|
||||
{shouldShowImageDetails && imageDTO && withMetadata && (
|
||||
<Box
|
||||
as={motion.div}
|
||||
key="metadataViewer"
|
||||
initial={initial}
|
||||
animate={animateMetadata}
|
||||
exit={exit}
|
||||
position="absolute"
|
||||
top={0}
|
||||
width="full"
|
||||
height="full"
|
||||
borderRadius="base"
|
||||
>
|
||||
<ImageMetadataViewer image={imageDTO} />
|
||||
</Box>
|
||||
)}
|
||||
</AnimatePresence>
|
||||
{shouldShowImageDetails && imageDTO && withMetadata && (
|
||||
<Box position="absolute" opacity={0.8} top={0} width="full" height="full" borderRadius="base">
|
||||
<ImageMetadataViewer image={imageDTO} />
|
||||
</Box>
|
||||
)}
|
||||
<AnimatePresence>
|
||||
{withNextPrevButtons && shouldShowNextPrevButtons && imageDTO && (
|
||||
<Box
|
||||
@ -152,10 +139,6 @@ const animateArrows: AnimationProps['animate'] = {
|
||||
opacity: 1,
|
||||
transition: { duration: 0.07 },
|
||||
};
|
||||
const animateMetadata: AnimationProps['animate'] = {
|
||||
opacity: 0.8,
|
||||
transition: { duration: 0.07 },
|
||||
};
|
||||
const exit: AnimationProps['exit'] = {
|
||||
opacity: 0,
|
||||
transition: { duration: 0.07 },
|
||||
|
Loading…
Reference in New Issue
Block a user