mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-12 08:47:31 +00:00
Remove "Retina" zoom preset
This commit is contained in:
@@ -178,12 +178,6 @@ export default class Output extends Component<Props, State> {
|
|||||||
// this.hideMenu();
|
// this.hideMenu();
|
||||||
};
|
};
|
||||||
|
|
||||||
private zoomTo2x = () => {
|
|
||||||
if (!this.pinchZoomLeft) throw Error('Missing pinch-zoom element');
|
|
||||||
this.pinchZoomLeft.scaleTo(0.5, scaleToOpts);
|
|
||||||
this.recenter();
|
|
||||||
};
|
|
||||||
|
|
||||||
private recenter = () => {
|
private recenter = () => {
|
||||||
const img = this.props.source?.preprocessed;
|
const img = this.props.source?.preprocessed;
|
||||||
if (!img || !this.pinchZoomLeft) return;
|
if (!img || !this.pinchZoomLeft) return;
|
||||||
@@ -342,10 +336,7 @@ export default class Output extends Component<Props, State> {
|
|||||||
</two-up>
|
</two-up>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div class={style.controls} hidden={hidden}>
|
||||||
class={style.controls}
|
|
||||||
hidden={hidden}
|
|
||||||
>
|
|
||||||
<div class={style.zoomControls}>
|
<div class={style.zoomControls}>
|
||||||
<button class={style.button} onClick={this.zoomOut}>
|
<button class={style.button} onClick={this.zoomOut}>
|
||||||
<RemoveIcon />
|
<RemoveIcon />
|
||||||
@@ -386,22 +377,20 @@ export default class Output extends Component<Props, State> {
|
|||||||
</button>
|
</button>
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<button class={style.button} onClick={onShowPreprocessorTransforms}>
|
<button
|
||||||
|
class={style.button}
|
||||||
|
onClick={onShowPreprocessorTransforms}
|
||||||
|
>
|
||||||
<RotateIcon /> Rotate & Transform
|
<RotateIcon /> Rotate & Transform
|
||||||
</button>
|
</button>
|
||||||
<button class={style.button} onClick={this.fitToViewport}>
|
<button class={style.button} onClick={this.fitToViewport}>
|
||||||
Fit to viewport
|
Fit to viewport
|
||||||
</button>
|
</button>
|
||||||
<button class={style.button} onClick={this.zoomTo2x}>
|
|
||||||
Simulate retina
|
|
||||||
</button>
|
|
||||||
<button class={style.button} onClick={this.recenter}>
|
<button class={style.button} onClick={this.recenter}>
|
||||||
Re-center
|
Re-center
|
||||||
</button>
|
</button>
|
||||||
<button class={style.button} onClick={onToggleBackground}>
|
<button class={style.button} onClick={onToggleBackground}>
|
||||||
<ToggleBackgroundIcon />
|
<ToggleBackgroundIcon /> Change canvas color
|
||||||
{' '}
|
|
||||||
Change canvas color
|
|
||||||
</button>
|
</button>
|
||||||
</Flyout>
|
</Flyout>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user