Skip to content

Conversation

@jacktday
Copy link
Contributor

This reduces jumping when adding atoms by reducing the need to resize the screen. This could be further improved by preventing the renderer from centering the molecule. Centering should already be turned off, there is likely some other setting that needs to be changed.

@jacktday
Copy link
Contributor Author

This now prevents any jumping, but disables auto scaling. I could manually add auto scaling or a way of panning and zooming could be added to the UI. I think the later is a better solution

@EBjerrum
Copy link
Owner

Thanks a lot for all you pull request! Unfortunately I'm super busy these final days before Christmas, but hopefully I will find the time to look at them soon

@EBjerrum
Copy link
Owner

I think this pull-request is not completely there. I think the setting of a fixedbondlength is great, as it keeps the initial molecule decent in size and similar in size. However, if we manually fix the scale we disable the autoscaling as you already mention. RDKits autoscaling is already a nice solution to the problem of the molecules getting too big and seem to then downscale the bondsize when the molecule can't fit the canvas. (fixedBondSize should maybe have been named maxBondSize???), and we then also must take over the panning and zooming ourselves (middle-click and drag, and scroll wheel could probably be used), alternatively check if drawatoms are outside the canvas and adjust the bond-length accordingly. This opens a lot of complexity, where the autoscaling from RDKit already fixed that. I've always said that rdEditor is a molecular editor and not a drawing tool, as we then circumvent the canvas concept and offload all layout and rendering to RDKit, thus getting the tool a bit more simple. (It has developed in the more complex direction anyway though, lol).
However, this is very interesting code (Thanks!) and going in the right direction. I think if we could figure out the autoscaling it would be more in-line with the editor concept rather than panning/zooming.
I think I'll expose the fixedBondLength draw option in #36 as it solves the issue with gigantic molecules when starting out a drawing. Then we can see if we can figure out the autoscaling.

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

Successfully merging this pull request may close these issues.

2 participants