-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from theosanderson/context-menu
feat: Add right-click context menu for copying sequence selections
- Loading branch information
Showing
7 changed files
with
11,942 additions
and
8,072 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.aider* | ||
.env | ||
gensplore-component/.yarn/install-state.gz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
nodeLinker: node-modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -85,5 +85,6 @@ | |
"last 1 firefox version", | ||
"last 1 safari version" | ||
] | ||
} | ||
}, | ||
"packageManager": "[email protected]+sha512.4e502bea682e7d8004561f916f1da2dfbe6f718024f6aa50bf8cd86f38ea3a94a7f1bf854a9ca666dd8eafcfb8d44baaa91bf5c7876e79a7aeac952c332f0e88" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import React from 'react'; | ||
|
||
const ContextMenu = ({ x, y, onClose, onCopy, onCopyRC }) => { | ||
if (x === null || y === null) return null; | ||
|
||
return ( | ||
<div | ||
className="fixed bg-white shadow-lg border border-gray-200 rounded-md py-1 z-50" | ||
style={{ left: x, top: y }} | ||
> | ||
<button | ||
className="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" | ||
onClick={onCopy} | ||
> | ||
Copy Selection | ||
</button> | ||
<button | ||
className="block w-full text-left px-4 py-2 text-sm text-gray-700 hover:bg-gray-100" | ||
onClick={onCopyRC} | ||
> | ||
Copy as Reverse Complement | ||
</button> | ||
</div> | ||
); | ||
}; | ||
|
||
export default ContextMenu; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.