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

keep zoom level when switching #829

Open
sdavey opened this issue Nov 9, 2016 · 7 comments
Open

keep zoom level when switching #829

sdavey opened this issue Nov 9, 2016 · 7 comments
Labels
plugin idea this would be great as a JBrowse 1 plugin

Comments

@sdavey
Copy link

sdavey commented Nov 9, 2016

we would like to be able to switch chromosomes (refseqs) without changing the zoom level. Is there an option already to do this? If not, can one please be added?

@enuggetry
Copy link
Contributor

Unfortunately, not that I'm aware of. It seems there are some inherent functional properties of the implementation that suggests there may be a number of corner cases to deal with.

Noted.

@nathandunn
Copy link
Contributor

For Apollo, the plugin over-rides the onResize function to deal with this. I can point you to that code if you want to write your own plugin.

@sdavey
Copy link
Author

sdavey commented Nov 15, 2016

thanks for the suggestion. I found the code at https://github.com/GMOD/Apollo and will take a look.

Sean Davey
Dept. of Cellular and Molecular Medicine
University of Arizona
sdavey@email.arizona.edumailto:sdavey@email.arizona.edu

On Nov 15, 2016, at 4:45 PM, Nathan Dunn <notifications@github.commailto:notifications@github.com> wrote:

For Apollo, the plugin over-rides the onResize function to deal with this. I can point you to that code if you want to write your own plugin.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/829#issuecomment-260807396, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALOspjuWPoCFz0z4iQQ9VWz9s3wg7x-oks5q-kQcgaJpZM4Kt_9a.

@nathandunn
Copy link
Contributor

You can try here:

https://github.com/GMOD/Apollo/blob/master/client/apollo/js/main.js#L219 https://github.com/GMOD/Apollo/blob/master/client/apollo/js/main.js#L219

Though there might be better ways to do this, as well.

Nathan

On Nov 15, 2016, at 3:49 PM, sdavey notifications@github.com wrote:

thanks for the suggestion. I found the code at https://github.com/GMOD/Apollo and will take a look.

Sean Davey
Dept. of Cellular and Molecular Medicine
University of Arizona
sdavey@email.arizona.edumailto:sdavey@email.arizona.edu

On Nov 15, 2016, at 4:45 PM, Nathan Dunn <notifications@github.commailto:notifications@github.com> wrote:

For Apollo, the plugin over-rides the onResize function to deal with this. I can point you to that code if you want to write your own plugin.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/829#issuecomment-260807396, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALOspjuWPoCFz0z4iQQ9VWz9s3wg7x-oks5q-kQcgaJpZM4Kt_9a.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub #829 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AAt2qqwqGLTquuWNzId_2C_986yQXt9wks5q-kTygaJpZM4Kt_9a.

@sdavey
Copy link
Author

sdavey commented Nov 15, 2016

looks great. thanks again.

Sean Davey
Dept. of Cellular and Molecular Medicine
University of Arizona
sdavey@email.arizona.edumailto:sdavey@email.arizona.edu

On Nov 15, 2016, at 4:51 PM, Nathan Dunn <notifications@github.commailto:notifications@github.com> wrote:

You can try here:

https://github.com/GMOD/Apollo/blob/master/client/apollo/js/main.js#L219 https://github.com/GMOD/Apollo/blob/master/client/apollo/js/main.js#L219

Though there might be better ways to do this, as well.

Nathan

On Nov 15, 2016, at 3:49 PM, sdavey <notifications@github.commailto:notifications@github.com> wrote:

thanks for the suggestion. I found the code at https://github.com/GMOD/Apollo and will take a look.

Sean Davey
Dept. of Cellular and Molecular Medicine
University of Arizona
sdavey@email.arizona.edumailto:sdavey@email.arizona.edumailto:sdavey@email.arizona.edu

On Nov 15, 2016, at 4:45 PM, Nathan Dunn <notifications@github.commailto:notifications@github.commailto:notifications@github.com> wrote:

For Apollo, the plugin over-rides the onResize function to deal with this. I can point you to that code if you want to write your own plugin.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/829#issuecomment-260807396, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALOspjuWPoCFz0z4iQQ9VWz9s3wg7x-oks5q-kQcgaJpZM4Kt_9a.


You are receiving this because you commented.
Reply to this email directly, view it on GitHub #829 (comment), or mute the thread https://github.com/notifications/unsubscribe-auth/AAt2qqwqGLTquuWNzId_2C_986yQXt9wks5q-kTygaJpZM4Kt_9a.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHubhttps://github.com//issues/829#issuecomment-260808494, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ALOspvXV8dL4DaKTNl-bR6AT75aRtSO7ks5q-kV0gaJpZM4Kt_9a.

@nathandunn
Copy link
Contributor

Also, I had a problem with some customizations I was making and had to add this after that code. Again, not sure if it was the best way, but it worked:

    browser.afterMilestone( 'completely initialized', function() {
        var view  = browser.view ;
        var projectionString = view.ref.name ;
        var projectionLength = window.parent.getProjectionLength(projectionString);
        var ratio = view.elem.clientWidth  / projectionLength  ;

        browser.view.pxPerBp = ratio ;
        browser.view.onResize();
    });

@rbuels rbuels added the plugin idea this would be great as a JBrowse 1 plugin label Jan 28, 2018
@rbuels
Copy link
Collaborator

rbuels commented Jan 28, 2018

This is an interesting one, because I can see how some users might want this behavior, but others might not. This sounds like a good idea for a plugin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
plugin idea this would be great as a JBrowse 1 plugin
Projects
None yet
Development

No branches or pull requests

4 participants