From 1ea1caa025d22c7684e84c9053b9318237deb9c1 Mon Sep 17 00:00:00 2001 From: Paul Schwind Date: Sat, 22 Jul 2023 15:47:42 +0200 Subject: [PATCH] Run prettier --- src/main/apollon-editor.ts | 15 +++++++++++---- src/main/scenes/application.tsx | 12 +++++++----- 2 files changed, 18 insertions(+), 9 deletions(-) diff --git a/src/main/apollon-editor.ts b/src/main/apollon-editor.ts index b6184564..b4bf221b 100644 --- a/src/main/apollon-editor.ts +++ b/src/main/apollon-editor.ts @@ -24,8 +24,12 @@ export class ApollonEditor { private ensureInitialized() { if (!this.store) { // tslint:disable-next-line:no-console - console.error('The application state of Apollon could not be retrieved. The editor may already be destroyed or you might need to `await apollonEditor.renderCycle`.'); - throw new Error('The application state of Apollon could not be retrieved. The editor may already be destroyed or you might need to `await apollonEditor.renderCycle`.'); + console.error( + 'The application state of Apollon could not be retrieved. The editor may already be destroyed or you might need to `await apollonEditor.renderCycle`.', + ); + throw new Error( + 'The application state of Apollon could not be retrieved. The editor may already be destroyed or you might need to `await apollonEditor.renderCycle`.', + ); } } @@ -113,7 +117,10 @@ export class ApollonEditor { private errorSubscribers: { [key: number]: (error: Error) => void } = {}; private nextRenderPromise: Promise; - constructor(private container: HTMLElement, private options: Apollon.ApollonOptions) { + constructor( + private container: HTMLElement, + private options: Apollon.ApollonOptions, + ) { let state: PartialModelState | undefined = options.model ? ModelState.fromModel(options.model) : {}; state = { @@ -158,7 +165,7 @@ export class ApollonEditor { }, state, styles: options.theme, - locale: options.locale + locale: options.locale, }); const errorBoundary = createElement(ErrorBoundary, { onError: this.onErrorOccurred.bind(this) }, element); this.root = createRoot(container); diff --git a/src/main/scenes/application.tsx b/src/main/scenes/application.tsx index 8931106e..9c6d053e 100644 --- a/src/main/scenes/application.tsx +++ b/src/main/scenes/application.tsx @@ -41,7 +41,6 @@ export class Application extends React.Component { this.resolveInitialized = resolve; }); - setCanvas = (ref: CanvasComponent) => { if (ref && ref.layer.current) { this.setState({ canvas: { ...ref, layer: ref.layer.current } }); @@ -61,10 +60,13 @@ export class Application extends React.Component { return ( - { - this.store ??= ref as ModelStore; - this.resolveInitialized(); - }}> + { + this.store ??= ref as ModelStore; + this.resolveInitialized(); + }} + >