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

Is overlapping a problem with Molecule "add-ons"? #68

Closed
zepumph opened this issue Jul 19, 2017 · 3 comments
Closed

Is overlapping a problem with Molecule "add-ons"? #68

zepumph opened this issue Jul 19, 2017 · 3 comments

Comments

@zepumph
Copy link
Member

zepumph commented Jul 19, 2017

from code review #30
Do we want to support a bit nicer display when pieces of the molecules intersect on the triatomic screen?

The problem is illustrated below.

image

@pixelzoom
Copy link
Contributor

pixelzoom commented Jul 19, 2017

This is a design issue.

Long long ago, we decided not to flip which side of the bond the dipole appears on, because having the dipole switching sides while dragging was distracting. So we decided to live with "overlap" situations like the one shown above. @emily-phet are you OK with that original decision, or do you want to revisit?

If we want to revisit... The decision not to "switch sides" informed the Java implementation, and was ported to the HTML5. Positioning of the bond dipoles is handled by the bond, which knows nothing about other bonds. The dipole is positioned parallel to the bond, and always on the same "side" of the bond. If we want to position the dipoles in a way that minimizes overlap that is (a) a non-trivial problem and (b) a totally different implementation of the view for bonds, triatomic molecule, and diatomic molecule (since it shares the same bond implementation). The bond would no longer be responsible for positioning the dipole. The molecule would need to be responsible for repositioning the dipole, so it could account for the position of all dipoles and partial charges. This would be a rewrite, not a change.

@emily-phet let me know how you want to proceed.

@pixelzoom
Copy link
Contributor

In case there's any question... Here's the same scenario, with the same overlap, in the Java version:

screenshot_327

@emily-phet
Copy link

@pixelzoom We should leave this as-is, allowing bond dipoles to overlap.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants