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

Horizontal chromosome truncated moment before ending rotation back #109

Open
mtwichan opened this issue Nov 5, 2018 · 4 comments
Open

Comments

@mtwichan
Copy link
Contributor

mtwichan commented Nov 5, 2018

The ideogram rotates and renders in a weird way on the rotation animation. This is evident in the sample examples as well, just click on a chromosome-> https://eweitz.github.io/ideogram/mouse

@eweitz
Copy link
Owner

eweitz commented Nov 6, 2018

By "on the rotation animation", do you mean during the rotation animation itself, or after it?

The animation itself was slightly degraded as a side-effect of #102, but that fixed a more significant issue with distortion after rotation. If that isn't the issue you're describing, could you elaborate?

@mtwichan
Copy link
Contributor Author

mtwichan commented Nov 6, 2018

Sure. This is more directed towards the animation itself. Sorry for not being so clear!

ideogram

@eweitz
Copy link
Owner

eweitz commented Nov 6, 2018

Thanks for the recording; very helpful.

I suspect the problem here has more to do with band labels than with horizontal orientation. Specifically, there is a brief but noticeable pause between when the rotation completes and when the chromosome and its labels are re-rendered. @matthewchan15, if you see a different issue, please further clarify.

That pause between rotation completion and re-rendering likely occurs because expensive calculations on label overlap and hiding are done at that time. When band labels are being restored to a previous state (e.g. rotating back to horizontal, or rotated vertically for a second time), perhaps the previous layout can be cached in memory and retrieved, rather than re-calculated from scratch.

@eweitz
Copy link
Owner

eweitz commented Nov 17, 2018

Oh, I see the issue now.

Steps to reproduce:

  • Go to https://eweitz.github.io/ideogram/mouse
  • Notice original state has horizontal orientation
  • Click chromosome 1, rotating it to vertical orientation
  • Click chromosome 1 again, rotating it back to horizontal
  • Notice how chromosome 1 is truncated at right the moment before ending its rotation back to its original horizontal orientation

I welcome contributions to fix this; I probably won't get to it for a while.

@eweitz eweitz changed the title Problem with on rotate of Ideogram, when in horizontal position. Horizontal chromosome truncated moment before ending rotation back Nov 17, 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

2 participants