mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-15 18:19:47 +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,24 +409,22 @@ 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}
|
source={source}
|
||||||
source={source}
|
orientation={orientation}
|
||||||
orientation={orientation}
|
imageIndex={index}
|
||||||
imageIndex={index}
|
imageFile={image.file}
|
||||||
imageFile={image.file}
|
downloadUrl={image.downloadUrl}
|
||||||
downloadUrl={image.downloadUrl}
|
preprocessorState={image.preprocessorState}
|
||||||
preprocessorState={image.preprocessorState}
|
encoderState={image.encoderState}
|
||||||
encoderState={image.encoderState}
|
onEncoderTypeChange={this.onEncoderTypeChange.bind(this, index)}
|
||||||
onEncoderTypeChange={this.onEncoderTypeChange.bind(this, index)}
|
onEncoderOptionsChange={this.onEncoderOptionsChange.bind(this, index)}
|
||||||
onEncoderOptionsChange={this.onEncoderOptionsChange.bind(this, index)}
|
onPreprocessorOptionsChange={this.onPreprocessorOptionsChange.bind(this, index)}
|
||||||
onPreprocessorOptionsChange={this.onPreprocessorOptionsChange.bind(this, index)}
|
onCopyToOtherClick={this.onCopyToOtherClick.bind(this, index)}
|
||||||
onCopyToOtherClick={this.onCopyToOtherClick.bind(this, index)}
|
/>
|
||||||
/>
|
))}
|
||||||
))}
|
|
||||||
</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