Skip to content

Commit

Permalink
Fix structure viewer setting modal placement
Browse files Browse the repository at this point in the history
  • Loading branch information
ceriottm authored and Luthaf committed Dec 15, 2023
1 parent a820e58 commit de8bbef
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,13 @@ export class ChemiscopeApp {

this.visualizer.structure.positionSettingsModal = (rect) => {
const structureRect = getByID('chemiscope-structure').getBoundingClientRect();
let left = structureRect.left - rect.width + 25;
if (left < 25) {
left = 25;
}
return {
top: structureRect.top,
left: structureRect.left - rect.width - 25,
left: left,
};
};

Expand Down

0 comments on commit de8bbef

Please sign in to comment.