From 9f82c1de2869653b4a5a1c518157c84c83f53c63 Mon Sep 17 00:00:00 2001 From: Elia Lazzari Date: Mon, 20 Feb 2023 18:08:19 +0100 Subject: [PATCH] Fixed issue in toggleAllLensflares() --- package.json | 2 +- src/index.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 06d0ece..db766ca 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "photo-sphere-viewer-lensflare-plugin", - "version": "1.1.0", + "version": "1.1.1", "description": "Plugin to add lens flares on a 360° pano built with photo-sphere-viewer", "main": "dist/index.js", "module": "dist/index.module.js", diff --git a/src/index.ts b/src/index.ts index 6acc0a8..a8ade65 100644 --- a/src/index.ts +++ b/src/index.ts @@ -231,7 +231,7 @@ export class LensflarePlugin extends AbstractPlugin { */ toggleLensflare(lensflareId: string | LensflareConfig, visible?: boolean) { const lensflare = this.getLensflare(lensflareId); - lensflare.visible = visible === null ? !lensflare.visible : visible; + lensflare.visible = visible === undefined ? !lensflare.visible : visible; this.viewer.needsUpdate(); }