From 8c9b10cde594afd0c7a1782fb5298bf25ce36ebe Mon Sep 17 00:00:00 2001 From: mistic100 Date: Thu, 18 Jul 2024 21:55:13 +0200 Subject: [PATCH] Fix #1379 virtual-tour: arrows position with gallery in 2d mode --- packages/virtual-tour-plugin/src/ArrowsRenderer.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/virtual-tour-plugin/src/ArrowsRenderer.ts b/packages/virtual-tour-plugin/src/ArrowsRenderer.ts index 0627cebeb..a1468fa32 100644 --- a/packages/virtual-tour-plugin/src/ArrowsRenderer.ts +++ b/packages/virtual-tour-plugin/src/ArrowsRenderer.ts @@ -64,10 +64,12 @@ export class ArrowsRenderer extends AbstractComponent { } init() { - this.gallery = this.viewer.getPlugin('gallery'); + if (this.is3D) { + this.gallery = this.viewer.getPlugin('gallery'); - this.gallery?.addEventListener('show-gallery', this); - this.gallery?.addEventListener('hide-gallery', this); + this.gallery?.addEventListener('show-gallery', this); + this.gallery?.addEventListener('hide-gallery', this); + } } override destroy(): void {