diff --git a/src/client/lazy-app/Compress/Output/index.tsx b/src/client/lazy-app/Compress/Output/index.tsx index 58d5ba3f..511ecfea 100644 --- a/src/client/lazy-app/Compress/Output/index.tsx +++ b/src/client/lazy-app/Compress/Output/index.tsx @@ -5,8 +5,10 @@ import './custom-els/PinchZoom'; import './custom-els/TwoUp'; import * as style from './style.css'; import 'add-css:./style.css'; -import { isSafari, shallowEqual } from '../../util'; +import { shallowEqual, isSafari } from '../../util'; import { + ToggleAliasingIcon, + ToggleAliasingActiveIcon, ToggleBackgroundIcon, AddIcon, RemoveIcon, @@ -34,6 +36,7 @@ interface State { scale: number; editingScale: boolean; altBackground: boolean; + aliasing: boolean; } const scaleToOpts: ScaleToOpts = { @@ -48,6 +51,7 @@ export default class Output extends Component { scale: 1, editingScale: false, altBackground: false, + aliasing: false, }; canvasLeft?: HTMLCanvasElement; canvasRight?: HTMLCanvasElement; @@ -144,6 +148,12 @@ export default class Output extends Component { return props.rightCompressed || (props.source && props.source.preprocessed); } + private toggleAliasing = () => { + this.setState((state) => ({ + aliasing: !state.aliasing, + })); + }; + private toggleBackground = () => { this.setState({ altBackground: !this.state.altBackground, @@ -254,7 +264,7 @@ export default class Output extends Component { render( { mobileView, leftImgContain, rightImgContain, source }: Props, - { scale, editingScale, altBackground }: State, + { scale, editingScale, altBackground, aliasing }: State, ) { const leftDraw = this.leftDrawable(); const rightDraw = this.rightDrawable(); @@ -288,7 +298,9 @@ export default class Output extends Component { ref={linkRef(this, 'pinchZoomLeft')} > { ref={linkRef(this, 'pinchZoomRight')} > {
- - + )} +