Giter Club home page Giter Club logo

Comments (6)

tristanguigue avatar tristanguigue commented on May 22, 2024 3

I can't seem to get d3.mouse to work still. It throws a TypeError: container.getBoundingClientRect is not a function

Using this (simplified) example:

let container = d3.select(ReactFauxDOM.createElement('svg'));
container.selectAll('g')
    .data(data)
  .enter().append('g')
    .append('path')
    .attr('d', function(d) {return line(d.values);})
    .on('mouseover', function() {
        let pos = d3.mouse(this) // throws an error
    });

Any reason why this is?

from react-faux-dom.

alexyuly avatar alexyuly commented on May 22, 2024 1

@tristanguigue +1. I'm getting the same error (container.getBoundingClientRect is not a function) calling a D3 zoom behavior on an SVG element appended to a <div> created with react-faux-dom, like so (simplified for clarity):

d3.select(createElement('div'))
  .append('svg')
    .call(d3.behavior.zoom().on('zoom', () => { ... })
    .append('g');

Perhaps I am missing something.

from react-faux-dom.

Olical avatar Olical commented on May 22, 2024 1

Interesting, would you like to open another issue with some steps to reproduce? Once we have tests for it, it'll be a lot easier.

from react-faux-dom.

martpie avatar martpie commented on May 22, 2024

Give that man à cookie...

Thanks a lot !

from react-faux-dom.

Olical avatar Olical commented on May 22, 2024

No problem :D I needed something to do on this five hour long train ride!
On 11 Oct 2015 9:17 pm, "Pierre de la Martinière" [email protected]
wrote:

Give that man à cookie...

Thanks a lot !


Reply to this email directly or view it on GitHub
#9 (comment)
.

from react-faux-dom.

sungwoncho avatar sungwoncho commented on May 22, 2024

@Olical I think I found a related issue. Please see #66.

from react-faux-dom.

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.