Skip to content

Commit

Permalink
Merge pull request #2076 from voxel51/escape-l3d-bug
Browse files Browse the repository at this point in the history
Fix Looker3D escape sequence
  • Loading branch information
brimoor committed Sep 9, 2022
2 parents c53d7a8 + 2b16fc5 commit d76af60
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/packages/looker-3d/src/Looker3d.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ function Looker3dCore({ sampleOverride: sample }) {
"Escape",
({ get, set }) => {
const panels = get(fos.lookerPanels);
let lookerPanelUpdate;

for (let panel of ["help", "json"]) {
if (panels[panel].isOpen) {
set(fos.lookerPanels, {
Expand All @@ -426,7 +426,10 @@ function Looker3dCore({ sampleOverride: sample }) {
return;
}
}
if (get(fos.hoveredSample)?._id !== sample._id) return;
const hovered = get(fos.hoveredSample);
if (hovered && hovered._id !== sample._id) {
return;
}

const selectedLabels = get(fos.selectedLabels);
if (selectedLabels && Object.keys(selectedLabels).length > 0) {
Expand Down

0 comments on commit d76af60

Please sign in to comment.