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 {