-
Notifications
You must be signed in to change notification settings - Fork 186
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
#6215 – Introducing the snap to angle and standard bond length for monomers connected via bonds #6570
base: master
Are you sure you want to change the base?
Conversation
snapPosition, | ||
).length(); | ||
|
||
if (distanceToSnapPosition < 0.375) { |
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.
Maybe move 0.375 to constant and use here and I remember the same somewhere in curved bonds
SelectRectangle.calculateAngleSnap( | ||
cursorPositionInAngstroms, | ||
connectedMonomer.position, | ||
this.editor.mode.modeName === 'snake-layout-mode' ? 90 : 30, |
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.
Maybe use this.editor.mode instanceof SnakeMode?
if (isAngleSnapped && isDistanceSnapped) { | ||
snapPosition = distanceSnapPosition; | ||
} else if (isAngleSnapped) { | ||
snapPosition = angleSnapPosition; | ||
} else if (isDistanceSnapped) { | ||
snapPosition = distanceSnapPosition; | ||
} |
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.
Very clear what happens in this method. Thank you
this.topLayer.selectAll('*').remove(); | ||
this.defaultLayer.selectAll('*').remove(); |
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.
Not sure how * selector works for d3, but potentially it could be a cause of performance degradation in some cases. Let's just keep it in mind for now.
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.
Maybe it would be better to organize elements somehow to delete only group element
c5dc1b6
to
885f752
Compare
885f752
to
250b9f1
Compare
How the feature works? / How did you fix the issue?
(Screenshots, videos, or GIFs, if applicable)
Check list
#1234 – issue name