From 2ca0474c687c42c354349547aeb337b34d1f1428 Mon Sep 17 00:00:00 2001 From: Kaede Fujisaki Date: Thu, 4 Jan 2024 20:07:17 +0900 Subject: [PATCH] de-select --- client/src/omote/layers/Index.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/client/src/omote/layers/Index.ts b/client/src/omote/layers/Index.ts index 366edb6..b164189 100644 --- a/client/src/omote/layers/Index.ts +++ b/client/src/omote/layers/Index.ts @@ -55,15 +55,15 @@ export default class Index extends Layer { render(time: number, matWorld: mat4) { const m = this.moments_.render(time, matWorld, this.mouseX_, this.mouseY_); - if(m !== null && m !== this.selected_) { + if(m !== this.selected_) { this.selected_ = m; this.onSelectionChanged_(m); } } - private onSelectionChanged_(m: Moment) { + private onSelectionChanged_(m: Moment | null) { const tooltip = this.tooltip_; - if(m == null) { + if(m === null) { tooltip.classList.add('hidden'); } else { tooltip.classList.remove('hidden');