Skip to content

Commit

Permalink
update mouse interaction note
Browse files Browse the repository at this point in the history
  • Loading branch information
eimrek committed Aug 8, 2024
1 parent a9e8471 commit eec0ce2
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
1 change: 0 additions & 1 deletion src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ function App() {
const [cifText3D, setCifText3D] = useState(null);
const [cifText2D, setCifText2D] = useState(null);

// componentDidMount equivalent
useEffect(() => {
fetchCif3D().then((cifText) => {
setCifText3D(cifText);
Expand Down
12 changes: 6 additions & 6 deletions src/StructureVisualizer/StructureWindow/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@
}

.mouse-disabled-note {
background-color: #fff1f1;
border: 1px solid black;
background-color: #f8f8f8;
border: 1px solid #999999;
color: #353434;
padding: 2px 6px;
padding: 1px 6px;
border-radius: 5px;
position: absolute;
top: 10px;
left: 10px;
bottom: 10px;
right: 10px;
z-index: 3;
cursor: pointer;
user-select: none;
}

.on {
background-color: #e9ffe7;
display: none;
}

.mouse-disabled-note:hover {
Expand Down
3 changes: 1 addition & 2 deletions src/StructureVisualizer/StructureWindow/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ class StructureWindow extends React.Component {
let swClassName = "structure-window";
if (!this.props.mouseEnabled) swClassName += " disable-mouse";

let mouseNoteText = "Interaction off";
let mouseNoteText = "Click to interact";
let mouseNoteClass = "mouse-disabled-note";
if (this.props.mouseEnabled) {
mouseNoteText = "Interaction on";
mouseNoteClass = "mouse-disabled-note on";
}
return (
Expand Down

0 comments on commit eec0ce2

Please sign in to comment.