-
Notifications
You must be signed in to change notification settings - Fork 118
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
Zooming in CircosJS #62
Comments
Hi @jnunez17 sorry for the late answer. I don't know at all how zoom is working so I won't be able to help you without digging into the subject. I let the issue open so that I will work on it next time I maintain this project. If you found a solution, I would be really glad if you can share it so that I could add it to the documentation of this project. |
Hello @nicgirault, sorry for the late reply. The issue is that having the structure const container = select(this.conf.container) This small change will allow users to have SVG containers in their applications, by giving an svg.call(d3.zoom().on("zoom", function() {
svg.attr("transform", d3.event.transform)
})); There is more information about having an SVG container in the other discussion here. |
@jnunez17 Do you mind posting a code snippet on how you implemented this? I've been trying to make it work with
Thank you! |
@matthewchan15 That does not seem to be an issue with the zoom itself, but with something you are missing for getting it to work, possibly how you are importing the d3 modules. One thing you can try is importing the whole d3 library at the top of your script ( For the zoom, it should work just by removing the extra |
@jnunez17 Ah yes I tried I think there may be a misunderstanding on my part. Did you specify this block of code in
|
@matthewchan15 Sorry, I did not understand you before. You should be specifying the zoom call in your application, after creating the |
@jnunez17 The issue was that I wrongly assumed that |
Hello @nicgirault,
Is there a way to implement normal D3 zooming abilities within Circos layouts?
I'm using the Chords track similar to this example: https://github.com/nicgirault/circosJS/blob/master/doc/chords.png. I want to implement normal pan and zoom by scrolling with the mouse (https://bl.ocks.org/sgruhier/50990c01fe5b6993e82b8994951e23d0), and this is what I'm trying to do:
The zooming is not working as expected. As you can see, I have to do
svg.select(".all")
to actually select the svg element within the div tag.Thank you!
The text was updated successfully, but these errors were encountered: