Mozjpeg opts (#140)

* Switching to embind

* Adding options to mozjpeg wasm

* Updating packages

* Ditching enum - causing more problems than it's worth

* Adding mozjpeg options UI

* Forgot about this enum

* Bools just work
This commit is contained in:
Jake Archibald
2018-08-17 16:25:28 +01:00
committed by GitHub
parent bff515b63f
commit 1ae65dd4a1
13 changed files with 426 additions and 392 deletions

View File

@@ -157,7 +157,14 @@ export function inputFieldValueAsNumber(field: any): number {
* @param field An HTMLInputElement, but the casting is done here to tidy up onChange.
*/
export function inputFieldCheckedAsNumber(field: any): number {
return Number((field as HTMLInputElement).checked);
return Number(inputFieldChecked(field));
}
/**
* @param field An HTMLInputElement, but the casting is done here to tidy up onChange.
*/
export function inputFieldChecked(field: any): boolean {
return (field as HTMLInputElement).checked;
}
/**