mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
WIP - Lightbox Fixes
Still need to fix the images not being centered on load when the image res changes
This commit is contained in:
parent
9950790f4c
commit
0c3ae232af
@ -46,11 +46,9 @@
|
|||||||
|
|
||||||
.lightbox-preview-wrapper {
|
.lightbox-preview-wrapper {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
background-color: red;
|
|
||||||
background-color: var(--background-color-secondary);
|
background-color: var(--background-color-secondary);
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: auto max-content;
|
grid-template-columns: auto max-content;
|
||||||
|
|
||||||
place-items: center;
|
place-items: center;
|
||||||
width: 100vw;
|
width: 100vw;
|
||||||
height: 100vh;
|
height: 100vh;
|
||||||
|
@ -47,13 +47,8 @@ export default function ReactPanZoom({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<TransformWrapper centerOnInit minScale={0.1}>
|
||||||
<TransformWrapper
|
{({ zoomIn, zoomOut, resetTransform, centerView }) => (
|
||||||
initialScale={1}
|
|
||||||
initialPositionX={200}
|
|
||||||
initialPositionY={100}
|
|
||||||
>
|
|
||||||
{({ zoomIn, zoomOut, resetTransform }) => (
|
|
||||||
<>
|
<>
|
||||||
<div className="lightbox-image-options">
|
<div className="lightbox-image-options">
|
||||||
<IAIIconButton
|
<IAIIconButton
|
||||||
@ -109,10 +104,7 @@ export default function ReactPanZoom({
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<TransformComponent
|
<TransformComponent wrapperStyle={{ width: '100%', height: '100%' }}>
|
||||||
wrapperStyle={{ width: '100%', height: '100%' }}
|
|
||||||
>
|
|
||||||
<div>
|
|
||||||
<img
|
<img
|
||||||
style={{
|
style={{
|
||||||
transform: `rotate(${rotation * 90}deg) scaleX(${
|
transform: `rotate(${rotation * 90}deg) scaleX(${
|
||||||
@ -125,11 +117,9 @@ export default function ReactPanZoom({
|
|||||||
ref={ref}
|
ref={ref}
|
||||||
className={styleClass ? styleClass : ''}
|
className={styleClass ? styleClass : ''}
|
||||||
/>
|
/>
|
||||||
</div>
|
|
||||||
</TransformComponent>
|
</TransformComponent>
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
</TransformWrapper>
|
</TransformWrapper>
|
||||||
</>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user