I am just trying to build a function in javascript using the d3.js library. I need to add zoom and pan events. I did this following this example:
http://bl.ocks.org/mbostock/7ec977c95910dd026812
I drew a few lines on this plan. My problem is that when I zoom in, the line width also changes. I like that the line still has the original width when zoomed. I think I need to redraw it, but I'm not sure if this is the best way.
Can you tell if there is a better way to do this, or show me a simple example ?. Thank!
source
share