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

circle for the bond query feature is not centered #63

Closed
lpatiny opened this issue Nov 29, 2018 · 11 comments
Closed

circle for the bond query feature is not centered #63

lpatiny opened this issue Nov 29, 2018 · 11 comments

Comments

@lpatiny
Copy link
Member

lpatiny commented Nov 29, 2018

If you press q when over a bond there is a dialog box allowing to edit query features

However the circle that represents the fact that this bond is special is not centered on the bond

image

You can test it online: https://cheminfo.github.io/openchemlib-js/dist/Editor.html

@lpatiny
Copy link
Member Author

lpatiny commented Nov 30, 2018

It must be related to the different behaviour between java and javascript. Java draw an ellipse and toe x, y value is the top left. while in javascript we specify the center.

@targos
Copy link
Member

targos commented Nov 30, 2018

can you post links to the relevant source code?

@lpatiny
Copy link
Member Author

lpatiny commented Nov 30, 2018

Seems to me it is called from only one place that is common between java and javascript:
https://github.com/cheminfo/openchemlib-js/blob/master/src/com/actelion/research/gwt/chemlib/com/actelion/research/chem/AbstractDepictor.java#L707-L726

I guess the solution would be that for SVG and GWT depictor we add the radius.

@targos
Copy link
Member

targos commented Nov 30, 2018

the SVG depictor is in the original code

@targos
Copy link
Member

targos commented Nov 30, 2018

what do you mean by "add the radius" ? the radius seems to be used everywhere?

@rufenerc
Copy link
Contributor

rufenerc commented Nov 30, 2018 via email

@rufenerc
Copy link
Contributor

I see the problem.
Give me some time I guess I can manage this.

@lpatiny
Copy link
Member Author

lpatiny commented Dec 1, 2018

@rufenerc Please could you also have a look at #62 and maybe comment on #65 ?

If you could also send me by email your new email address. I could not invite you for the workshop last time.

rufenerc added a commit that referenced this issue Dec 1, 2018
@rufenerc
Copy link
Contributor

rufenerc commented Dec 1, 2018

Fixed in commit 09edf53

@rufenerc rufenerc closed this as completed Dec 1, 2018
@targos
Copy link
Member

targos commented Dec 1, 2018

The issue is still present in the SVG depictor. I may have time to fix it tomorrow.

img

@targos targos reopened this Dec 1, 2018
rufenerc added a commit that referenced this issue Dec 1, 2018
@rufenerc rufenerc closed this as completed Dec 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants