riccardoscalco / textures

Textures.js is a JavaScript library for creating SVG patterns
http://riccardoscalco.github.io/textures/
MIT License
6.03k stars 219 forks source link

d3 zoom #9

Open sofer-eg opened 9 years ago

sofer-eg commented 9 years ago

Is there any solution for change stroke-width and size using d3 zoom scale?

riccardoscalco commented 9 years ago

Really good point. Once I start work on this issue I let you know.

sofer-eg commented 9 years ago

Thanks! I try this code in zoom handler. It works, but looks like scaling not proportional.

d3.select('#' + texture.id())
    .attr('patternTransform', 'scale(' + 1 / d3.event.scale  + ')');
lboecker commented 9 years ago

I'm trying to figure this one out as well.

jacobpierce commented 9 years ago

+1 this would be extremely useful