Hide quantize options if original image. Fixes #120.

This commit is contained in:
Jake Archibald
2018-08-02 16:59:13 +01:00
parent 27722f77f9
commit d3f2836f48

View File

@@ -112,23 +112,27 @@ export default class Options extends Component<Props, State> {
return ( return (
<div class={`${style.options}${className ? (' ' + className) : ''}`}> <div class={`${style.options}${className ? (' ' + className) : ''}`}>
<p>Quantization</p> {encoderState.type !== 'identity' && (
<label> <div>
<input <p>Quantization</p>
name="quantizer.enable" <label>
type="checkbox" <input
checked={!!preprocessorState.quantizer.enabled} name="quantizer.enable"
onChange={this.onPreprocessorEnabledChange} type="checkbox"
/> checked={!!preprocessorState.quantizer.enabled}
Enable onChange={this.onPreprocessorEnabledChange}
</label> />
{preprocessorState.quantizer.enabled && Enable
<QuantizerOptionsComponent </label>
options={preprocessorState.quantizer} {preprocessorState.quantizer.enabled &&
onChange={this.onQuantizerOptionsChange} <QuantizerOptionsComponent
/> options={preprocessorState.quantizer}
} onChange={this.onQuantizerOptionsChange}
<hr/> />
}
<hr/>
</div>
)}
<label> <label>
Mode: Mode:
{encoderSupportMap ? {encoderSupportMap ?