aboutsummaryrefslogtreecommitdiff
path: root/viewer/src/services
diff options
context:
space:
mode:
Diffstat (limited to 'viewer/src/services')
-rw-r--r--viewer/src/services/indexfactory.ts6
-rw-r--r--viewer/src/services/indexsearch.ts2
-rw-r--r--viewer/src/services/ldzoom.ts10
3 files changed, 9 insertions, 9 deletions
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 @@
17-- along with this program. If not, see <https://www.gnu.org/licenses/>. 17-- along with this program. If not, see <https://www.gnu.org/licenses/>.
18*/ 18*/
19 19
20import { Operation } from '@/@types/Operation'; 20import { Operation } from "@/@types/Operation";
21import Navigation from '@/services/navigation'; 21import Navigation from "@/services/navigation";
22 22
23export default class IndexFactory { 23export default class IndexFactory {
24 24
@@ -35,7 +35,7 @@ export default class IndexFactory {
35 return; // Directories are not indexed 35 return; // Directories are not indexed
36 } 36 }
37 for (const tag of item.tags) { 37 for (const tag of item.tags) {
38 const parts = tag.split(':'); 38 const parts = tag.split(":");
39 let lastPart: string | null = null; 39 let lastPart: string | null = null;
40 for (const part of parts) { 40 for (const part of parts) {
41 tagsIndex[part] = IndexFactory.pushPartToIndex(tagsIndex[part], part, item, !Boolean(lastPart)); 41 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 @@
17-- along with this program. If not, see <https://www.gnu.org/licenses/>. 17-- along with this program. If not, see <https://www.gnu.org/licenses/>.
18*/ 18*/
19 19
20import { Operation } from '@/@types/Operation'; 20import { Operation } from "@/@types/Operation";
21 21
22export default class IndexSearch { 22export default class IndexSearch {
23 23
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 @@
18*/ 18*/
19 19
20// polyfill still required for IE and Safari, see https://caniuse.com/#feat=resizeobserver 20// polyfill still required for IE and Safari, see https://caniuse.com/#feat=resizeobserver
21import ResizeObserver from 'resize-observer-polyfill'; 21import ResizeObserver from "resize-observer-polyfill";
22import "hammerjs"; 22import "hammerjs";
23 23
24/** 24/**
@@ -54,25 +54,25 @@ export default class LdZoom {
54 this.updateImageScale(this.scaleFactor); 54 this.updateImageScale(this.scaleFactor);
55 }).observe(this.containerElement); 55 }).observe(this.containerElement);
56 56
57 this.containerElement.addEventListener('wheel', wheelEvent => { 57 this.containerElement.addEventListener("wheel", wheelEvent => {
58 wheelEvent.preventDefault(); 58 wheelEvent.preventDefault();
59 const scaleFactor = this.scaleFactor - Math.sign(wheelEvent.deltaY) * this.scrollZoomSpeed; 59 const scaleFactor = this.scaleFactor - Math.sign(wheelEvent.deltaY) * this.scrollZoomSpeed;
60 this.zoom(wheelEvent.offsetX, wheelEvent.offsetY, scaleFactor); 60 this.zoom(wheelEvent.offsetX, wheelEvent.offsetY, scaleFactor);
61 }); 61 });
62 62
63 const pinchListener = new Hammer(this.containerElement); 63 const pinchListener = new Hammer(this.containerElement);
64 pinchListener.get('pinch').set({enable: true}); 64 pinchListener.get("pinch").set({ enable: true });
65 this.installPinchHandler(pinchListener); 65 this.installPinchHandler(pinchListener);
66 } 66 }
67 67
68 private installPinchHandler(pinchListener: HammerManager) { 68 private installPinchHandler(pinchListener: HammerManager) {
69 let startScaleFactor = 0.0; 69 let startScaleFactor = 0.0;
70 70
71 pinchListener.on('pinchstart', (pinchEvent: HammerInput) => { 71 pinchListener.on("pinchstart", (pinchEvent: HammerInput) => {
72 startScaleFactor = this.scaleFactor; 72 startScaleFactor = this.scaleFactor;
73 }); 73 });
74 74
75 pinchListener.on('pinchmove', (pinchEvent: HammerInput) => { 75 pinchListener.on("pinchmove", (pinchEvent: HammerInput) => {
76 const focusX = pinchEvent.center.x + this.containerElement.scrollLeft; 76 const focusX = pinchEvent.center.x + this.containerElement.scrollLeft;
77 const focusY = pinchEvent.center.y + this.containerElement.scrollTop; 77 const focusY = pinchEvent.center.y + this.containerElement.scrollTop;
78 const scaleFactor = pinchEvent.scale * startScaleFactor; 78 const scaleFactor = pinchEvent.scale * startScaleFactor;