More demo updates

This commit is contained in:
Ingvar Stepanyan
2023-08-05 19:38:32 +01:00
parent 6c693186c2
commit 0380077969
6 changed files with 31 additions and 11 deletions

View File

@@ -17,14 +17,14 @@
*/
import { h, Component, createRef } from 'preact';
import { rethrowIfCritical } from './ops.js';
import { rethrowIfCritical } from 'web-gphoto2';
export const isDebug = new URLSearchParams(location.search).has('debug');
const Stats = isDebug
? await import('stats.js').then(
res => /** @type {typeof import('stats.js')} */(res['default'])
)
res => /** @type {typeof import('stats.js')} */ (res['default'])
)
: null;
/** @extends Component<{ getPreview?: () => Promise<Blob> }, { error?: string }> */
@@ -96,9 +96,9 @@ export class Preview extends Component {
blob,
ratio
? {
resizeWidth: canvas.width,
resizeHeight: canvas.height
}
resizeWidth: canvas.width,
resizeHeight: canvas.height
}
: {}
);
if (!ratio) {