GithubHelp home page GithubHelp logo

Comments (9)

antonioru avatar antonioru commented on May 18, 2024

Thank you for pointing this out @bogomya
I'll have a look at it as soon as possible

from beautiful-react-diagrams.

alexratmanpl avatar alexratmanpl commented on May 18, 2024

Hi @antonioru
That's very annoying bug indeed - when working with more nodes, especially when you have to place them inside a scrollable 'div', there's no way to link and manipulate them correctly - I would be very happy to use your tool in my project but because of that bug it's not possible.
You probably could fix that very easily by modifying useEffect function in DiagramCanvas.js and let it refresh the current position of canvas on each update, something like:
useEffect(() => calculateBBox(canvasRef.current));
In that case I suppose you may consider removing useWindowScroll hook as well.
Btw. great job, simple tool, clean code - it was kind of pleasure to search for a possible solution of fixing that bug. Congrats!

from beautiful-react-diagrams.

antonioru avatar antonioru commented on May 18, 2024

@alexratmanpl @bogomya

Thank you for pointing this out and supporting the project, I can't wait to work again on it as I really love this library.
I hope to do it as soon as possible so I can fix this precise bug and bring new improvements.
Unfortunately at the moment I am quite busy with work and personal life, but I would love to have some contributions.
Please feel free to open a PR

thank you

from beautiful-react-diagrams.

volkan-a avatar volkan-a commented on May 18, 2024

Hi @antonioru, is there any progress? I really would like to use on my project.

from beautiful-react-diagrams.

antonioru avatar antonioru commented on May 18, 2024

Hi @antonioru, is there any progress? I really would like to use on my project.

Hi @volkan-a
thank you for your concern, as mentioned in the previous comment: at the moment I am quite busy with work and personal life, but I would love to have some contributions.
If you feel like you need some improvements please feel free to open a PR :)

from beautiful-react-diagrams.

volkan-a avatar volkan-a commented on May 18, 2024

I think @alexratmanpl's suggestion works.

Just change line 31 in DiagramCanvas.js as:

useEffect(() => calculateBBox(canvasRef.current), [canvasRef.current, props]);

then it works. But I have no idea if that affects performance.

from beautiful-react-diagrams.

antonioru avatar antonioru commented on May 18, 2024

@volkan-a
This is an open source software, meaning everyone is titled to contribute.
If you want, make the change by yourself, test it, make sure it does not break anything and does not affect performances then open a PR.
I will be very happy to look at it.

from beautiful-react-diagrams.

antonioru avatar antonioru commented on May 18, 2024

@volkan-a @bogomya
Apparently this bugs appears on Firefox only, can you confirm it?

from beautiful-react-diagrams.

antonioru avatar antonioru commented on May 18, 2024

@volkan-a @bogomya

Ok I think I solved the bug in the last published version: 0.2.0

Please let me know if it works for you as well... I'm going to close the issue.

In case the bug shows up again, please just open a new bug report.

Thank you all for the patience

from beautiful-react-diagrams.

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.