-
Notifications
You must be signed in to change notification settings - Fork 55
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
Added shift select for amino acids, added copy feature for AA #247
base: develop
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we've addressed the feature request in:
Shift-clicking a second amino acid selects every nucleotide between the current selection point and the end of the second amino acid.
AFAICT we've added: after Shift-clicking the first amino acid, subsequent clicks extend the length and range of selection. But only if already holding shift on the first click. Can we change this so it also works if you just click (no shift) the first AA?
@@ -223,7 +223,9 @@ export class EventHandler extends React.PureComponent<EventsHandlerProps> { | |||
*/ | |||
handleMouseEvent = (e: React.MouseEvent<HTMLDivElement>) => { | |||
const { handleMouseEvent } = this.props; | |||
|
|||
if (e.shiftKey) { | |||
this.handleCopy(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm confused by this bit, why does it copy every time the cursor moves when shift selecting? I feel like I'd never expect that + doesn't cmd + c work just as well? I also find it surprising to click a single amino acid but have the entire translation copied
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea this wasn't the best implementation for copying the highlighted aa sequence. For some reason a normal cmd + c doesn't work with a highlighted aa sequence (selecting using the click + shift method, not drag select). I tried a work around but for now I'm going to remove that
@jjti I updated this for click + shift selecting the amino acids |
Addresses part of issue #213 specifically the following quote:
Now when a user holds down shift and selects an amino acid they can keep selecting amino acids and SeqViz will create a selection range for the selected AAs.
Additionally I added support for copying the amino acid selection to the clipboard.
I suppose this is more of a feature add than a bug fix, regardless I figured it would be useful.