Giter VIP home page Giter VIP logo

Comments (5)

mbostock avatar mbostock commented on May 2, 2024

We already set touch-action to none in both d3-drag and d3-zoom.

.style("touch-action", "none")

https://github.com/d3/d3-zoom/blob/1d0b81dbfb567add248f0346c112aaa74b4ed3ba/src/zoom.js#L72

Not really sure what else we can do here to help Edge, but I’d welcome a pull request if you determine how to fix this issue.

from d3-drag.

Herst avatar Herst commented on May 2, 2024

Concerning the touch-action issue I just figured out that it is not applied in IE11/Edge because of the default touchable function which makes sense since these browsers do not support touch events per default (in Edge it's can be enabled through a hidden flag). Now most the touch stuff (basically everything except for the pinch gesture) does still work in these browsers thanks to it being mapped to mouse events.

I didn't yet look into the other issue, I was looking into ways on how to support the pinch gesture first (d3/d3#1439 (comment)).

from d3-drag.

Herst avatar Herst commented on May 2, 2024

Concerning the original issue, I tracked it down to https://github.com/d3/d3-selection/blob/master/src/point.js, more specifically the following line:

point = point.matrixTransform(node.getScreenCTM().inverse());

node is refering to the outer <g>roup here, the one holding the transforms for d3.zoom.

(For what it's worth, pinch gesture triggered page zoom can be detected by checking document.documentElement.msContentZoomFactor.)

from d3-drag.

Herst avatar Herst commented on May 2, 2024

A possible workaround was outlined at https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14429296/#comment-2 but as noted there we would also need to dynamically detect whether the issue exists (no idea how to do it ATM). Would a workaround like that be something which would in principle get included into d3.js or would it be too much of a compatibility layer for your taste, @mbostock?

from d3-drag.

mbostock avatar mbostock commented on May 2, 2024

This sounds like a browser bug, and as D3 is not a compatibility layer, we don’t generally workaround browser bugs. Apologies for the delayed response!

from d3-drag.

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.