mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-16 02:29:50 +00:00
Fix power-of-2 range slider
This commit is contained in:
@@ -51,11 +51,14 @@ export class Options extends Component<Props, State> {
|
||||
mipmap: inputFieldChecked(form.mipmap, options.mipmap),
|
||||
srgb_mipmap: inputFieldChecked(form.srgb_mipmap, options.srgb_mipmap),
|
||||
mipmap_filter: form.mipmap_filter?.value ?? defaultOptions.mipmap_filter,
|
||||
// FIXME: We really should support range remapping
|
||||
// in the range-slider component. For now I’ll
|
||||
// shoe-horn it into the state management.
|
||||
mipmap_min_dimension:
|
||||
2 **
|
||||
inputFieldValueAsNumber(
|
||||
form.mipmap_min_dimension,
|
||||
options.mipmap_min_dimension,
|
||||
Math.floor(Math.log2(options.mipmap_min_dimension)),
|
||||
),
|
||||
quality: inputFieldValueAsNumber(form.quality, options.quality),
|
||||
compression: inputFieldValueAsNumber(
|
||||
|
||||
Reference in New Issue
Block a user