From ccecfd9421f4550a71134cd46e1388e486f8c564 Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Tue, 28 Apr 2020 03:47:39 +0200 Subject: viewer: global formatting unification --- viewer/src/services/indexfactory.ts | 6 +++--- viewer/src/services/indexsearch.ts | 2 +- viewer/src/services/ldzoom.ts | 10 +++++----- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'viewer/src/services') diff --git a/viewer/src/services/indexfactory.ts b/viewer/src/services/indexfactory.ts index 18a2800..e402185 100644 --- a/viewer/src/services/indexfactory.ts +++ b/viewer/src/services/indexfactory.ts @@ -17,8 +17,8 @@ -- along with this program. If not, see . */ -import { Operation } from '@/@types/Operation'; -import Navigation from '@/services/navigation'; +import { Operation } from "@/@types/Operation"; +import Navigation from "@/services/navigation"; export default class IndexFactory { @@ -35,7 +35,7 @@ export default class IndexFactory { return; // Directories are not indexed } for (const tag of item.tags) { - const parts = tag.split(':'); + const parts = tag.split(":"); let lastPart: string | null = null; for (const part of parts) { tagsIndex[part] = IndexFactory.pushPartToIndex(tagsIndex[part], part, item, !Boolean(lastPart)); diff --git a/viewer/src/services/indexsearch.ts b/viewer/src/services/indexsearch.ts index cd3383a..a55a829 100644 --- a/viewer/src/services/indexsearch.ts +++ b/viewer/src/services/indexsearch.ts @@ -17,7 +17,7 @@ -- along with this program. If not, see . */ -import { Operation } from '@/@types/Operation'; +import { Operation } from "@/@types/Operation"; export default class IndexSearch { diff --git a/viewer/src/services/ldzoom.ts b/viewer/src/services/ldzoom.ts index c28c2c8..ddf57c0 100644 --- a/viewer/src/services/ldzoom.ts +++ b/viewer/src/services/ldzoom.ts @@ -18,7 +18,7 @@ */ // polyfill still required for IE and Safari, see https://caniuse.com/#feat=resizeobserver -import ResizeObserver from 'resize-observer-polyfill'; +import ResizeObserver from "resize-observer-polyfill"; import "hammerjs"; /** @@ -54,25 +54,25 @@ export default class LdZoom { this.updateImageScale(this.scaleFactor); }).observe(this.containerElement); - this.containerElement.addEventListener('wheel', wheelEvent => { + this.containerElement.addEventListener("wheel", wheelEvent => { wheelEvent.preventDefault(); const scaleFactor = this.scaleFactor - Math.sign(wheelEvent.deltaY) * this.scrollZoomSpeed; this.zoom(wheelEvent.offsetX, wheelEvent.offsetY, scaleFactor); }); const pinchListener = new Hammer(this.containerElement); - pinchListener.get('pinch').set({enable: true}); + pinchListener.get("pinch").set({ enable: true }); this.installPinchHandler(pinchListener); } private installPinchHandler(pinchListener: HammerManager) { let startScaleFactor = 0.0; - pinchListener.on('pinchstart', (pinchEvent: HammerInput) => { + pinchListener.on("pinchstart", (pinchEvent: HammerInput) => { startScaleFactor = this.scaleFactor; }); - pinchListener.on('pinchmove', (pinchEvent: HammerInput) => { + pinchListener.on("pinchmove", (pinchEvent: HammerInput) => { const focusX = pinchEvent.center.x + this.containerElement.scrollLeft; const focusY = pinchEvent.center.y + this.containerElement.scrollTop; const scaleFactor = pinchEvent.scale * startScaleFactor; -- cgit v1.2.3