Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Fix the hover and deleting annotation issue" #40

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/components/antimony-editor/AntimonyEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ const AntimonyEditor: React.FC<AntimonyEditorProps & { database: IDBPDatabase<My
if (info && info.varInfo.annotations.length > 0) {
// Find the line number of the first annotation.
let line = Number.MAX_VALUE;
for (const value of info.varInfo.annotationLineNum.values()) {
for (const value of info.varInfo.annotationLineRange.values()) {
line = Math.min(value.start.line, line);
}

Expand Down Expand Up @@ -485,6 +485,7 @@ const AntimonyEditor: React.FC<AntimonyEditorProps & { database: IDBPDatabase<My
setNewContent(editor.getValue());
delayedModelParser(editor);
});
ModelSemanticsChecker(editor, annotUnderlinedOn, true, highlightColor, decorations);
};

return (
Expand Down Expand Up @@ -515,5 +516,4 @@ const AntimonyEditor: React.FC<AntimonyEditorProps & { database: IDBPDatabase<My
);
};

export default AntimonyEditor;

export default AntimonyEditor;
47 changes: 46 additions & 1 deletion src/components/header-menu/HeaderMenu.css
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ header {
color: white;
padding: 5px 15px;
cursor: pointer;
font-weight: normal;
}

.sub-menu-dropdown {
Expand Down Expand Up @@ -123,7 +124,51 @@ header {
border-radius: 2px;
}

.about-popup {
position: fixed;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
background-color: white;
border: 1px solid #ccc;
padding: 20px;
box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
z-index: 1000;
}
/* Popup for information of AWE */
.about-popup {
background-color: #464646;
border-radius: 5px;
}
.about-content {
display: flex;
flex-direction: column;
align-items: center;
background-color: #464646;
color: white; /* Added to ensure text is visible on dark background */
}

.about-content h2 {
margin: 0 0 10px 0;
}

.about-content p {
margin: 0 0 20px 0;
}

.about-content button {
padding: 5px 10px;
background-color: #333333;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
}

.about-content button:hover {
background-color: #005f8f;
}

#file-upload {
display: none;
}

Loading