From 9165cc1efcf7791f78b61b2c51a9de651b1b09aa Mon Sep 17 00:00:00 2001 From: Zero~Informatique Date: Fri, 2 Jul 2021 22:53:16 +0200 Subject: viewer: types normalization - gallery.d.ts GitHub: closes #301 --- viewer/src/services/ldzoom.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'viewer/src/services/ldzoom.ts') diff --git a/viewer/src/services/ldzoom.ts b/viewer/src/services/ldzoom.ts index 0fb0848..33a64c8 100644 --- a/viewer/src/services/ldzoom.ts +++ b/viewer/src/services/ldzoom.ts @@ -17,6 +17,7 @@ -- along with this program. If not, see . */ +import { PictureProperties, Resolution } from "@/@types/gallery"; import "hammerjs"; /** @@ -25,7 +26,7 @@ import "hammerjs"; export default class LdZoom { readonly containerElement: HTMLDivElement; readonly imageElement: HTMLImageElement; - readonly pictureProperties: Gallery.PictureProperties; + readonly pictureProperties: PictureProperties; readonly maxScaleFactor: number; readonly scrollZoomSpeed: number; scaleFactor: number = 0.0; @@ -33,7 +34,7 @@ export default class LdZoom { constructor( containerElement: HTMLDivElement, imageElement: HTMLImageElement, - pictureProperties: Gallery.PictureProperties, + pictureProperties: PictureProperties, maxScaleFactor: number, scrollZoomSpeed: number ) { @@ -83,7 +84,7 @@ export default class LdZoom { /** * Returns the picture resolution as it should be displayed. */ - private getDisplayResolution(): Gallery.Resolution { + private getDisplayResolution(): Resolution { return { width: this.pictureProperties.resolution.width * this.scaleFactor, height: this.pictureProperties.resolution.height * this.scaleFactor, -- cgit v1.2.3