mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-15 10:09:45 +00:00
Avoid having an element that covers the pinch zoom
This commit is contained in:
@@ -400,7 +400,7 @@ export default class Compress extends Component<Props, State> {
|
|||||||
const [leftImageData, rightImageData] = images.map(i => i.data);
|
const [leftImageData, rightImageData] = images.map(i => i.data);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div class={style.compress}>
|
<div class={`${style.compress} ${style[orientation]}`}>
|
||||||
<Output
|
<Output
|
||||||
originalImage={source && source.data}
|
originalImage={source && source.data}
|
||||||
orientation={orientation}
|
orientation={orientation}
|
||||||
@@ -409,7 +409,6 @@ export default class Compress extends Component<Props, State> {
|
|||||||
leftImgContain={leftImage.preprocessorState.resize.fitMethod === 'cover'}
|
leftImgContain={leftImage.preprocessorState.resize.fitMethod === 'cover'}
|
||||||
rightImgContain={rightImage.preprocessorState.resize.fitMethod === 'cover'}
|
rightImgContain={rightImage.preprocessorState.resize.fitMethod === 'cover'}
|
||||||
/>
|
/>
|
||||||
<div class={`${style.optionPair} ${style[orientation]}`}>
|
|
||||||
{images.map((image, index) => (
|
{images.map((image, index) => (
|
||||||
<Options
|
<Options
|
||||||
loading={loading || image.loading}
|
loading={loading || image.loading}
|
||||||
@@ -427,7 +426,6 @@ export default class Compress extends Component<Props, State> {
|
|||||||
/>
|
/>
|
||||||
))}
|
))}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,19 +1,15 @@
|
|||||||
.compress {
|
.compress {
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.option-pair {
|
|
||||||
display: flex;
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
contain: strict;
|
||||||
|
display: grid;
|
||||||
|
|
||||||
&.horizontal {
|
&.horizontal {
|
||||||
justify-content: space-between;
|
grid-template-columns: 1fr auto;
|
||||||
align-items: flex-end;
|
align-items: end;
|
||||||
}
|
}
|
||||||
|
|
||||||
&.vertical {
|
&.vertical {
|
||||||
flex-direction: column;
|
// TODO
|
||||||
justify-content: flex-end;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user