Giter Site home page Giter Site logo

Zoom behaviour not working in Firefox about d3 HOT 7 CLOSED

d3 avatar d3 commented on April 18, 2024
Zoom behaviour not working in Firefox

from d3.

Comments (7)

mbostock avatar mbostock commented on April 18, 2024

Cool example!

I'd consider adding a border or background to the visualization so that the reinterpretation of mousewheel (for scrolling) is more obvious. I've also been thinking that, given the trouble of mousewheel, maybe we should use click to zoom (rather than dblclick), in conjunction with a smooth animation? Maybe toggle between two zoom levels rather than arbitrary zooming.

from d3.

jasondavies avatar jasondavies commented on April 18, 2024

Border added now, thanks!

The problem with click to zoom is that it kind of conflicts with drag to pan. I guess you can distinguish a click from a drag though. I'll think about it...

from d3.

mbostock avatar mbostock commented on April 18, 2024

Right, a click without moving the mouse would zoom (on mouseup) while a click and drag would pan.

from d3.

jasondavies avatar jasondavies commented on April 18, 2024

Sounds good. I think people may still want the mousewheel behaviour for arbitrary zooming though. Just having two zoom levels might be a bit restrictive? I guess my mathematical demos are more suited for arbitrary zooms, but actual data visualisations may only need two zoom levels.

from d3.

mbostock avatar mbostock commented on April 18, 2024

Right, well you could support multiple discrete zoom levels, with each click zooming in further (and shift-click zooming out). But yeah, maybe we want different behaviors, or different modes on the zoom behavior.

I really, really like this method of interaction (two-directional trackpad mousewheel for panning):

http://beta.diymaps.com/

from d3.

jasondavies avatar jasondavies commented on April 18, 2024

Wow, the two-directional trackpad thing is awesome! Okay, totally sold on this now :-)

Now we just need to support those nifty pinch gestures :-)

from d3.

jasondavies avatar jasondavies commented on April 18, 2024

Well, I'm not sure pinch gestures on trackpads are that usable. Of course, if we detect an iDevice in use it's a different matter.

from d3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.