mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-14 17:49:52 +00:00
Hide quantize options if original image. Fixes #120.
This commit is contained in:
@@ -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 ?
|
||||||
|
|||||||
Reference in New Issue
Block a user