Skip to content

Commit

Permalink
de-select
Browse files Browse the repository at this point in the history
  • Loading branch information
ledyba committed Jan 4, 2024
1 parent 64a3bb4 commit 2ca0474
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions client/src/omote/layers/Index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down

0 comments on commit 2ca0474

Please sign in to comment.