Giter Site home page Giter Site logo

Comments (8)

rokotyan avatar rokotyan commented on May 23, 2024 1

@jonsch1 Thanks for providing the example!

Different hardware and browsers can have different maximum point size limit which makes it a bit difficult to adapt to. We're thinking about implementing a new point sizing strategy on zoom and will keep you posted. Most likely that will happen closer to summer.

from cosmos.

Stukova avatar Stukova commented on May 23, 2024 1

@jonsch1 Sorry, my mistake, not zoomNodesOnZoom, but scaleNodesOnZoom 🤦‍♀️ Should work with react too.

from cosmos.

Stukova avatar Stukova commented on May 23, 2024

Thanks @jonsch1 !

Could you please share more details about the scaling issue you're encountering? As a potential solution, you could try using the beta version of the @cosmograph/react library, version 1.4.0-beta.0, which includes a newer version of the @cosmograph/cosmos library.

from cosmos.

jonsch1 avatar jonsch1 commented on May 23, 2024

Thank you for the quick response! So, i tried the 1.4.0 beta version, but it didn't help.
Here is a more detailed explanation and image of the scaling issue:

When zooming in from a high distance, nodes grow until they reach their maximum size. Further zooming in won't change the node size, as they shrink to maintain their relative size.
However, when opening the visualization in Safari, it seems that the maximum node size is much larger, which reduces the visualization's effectiveness when zooming in to focus on a group of nodes.

Screenshot 2024-03-22 at 20 53 05

from cosmos.

Stukova avatar Stukova commented on May 23, 2024

@jonsch1 You can alternatively disable the resizing of nodes on zoom by setting the config option zoomNodesOnZoom to false.

from cosmos.

jonsch1 avatar jonsch1 commented on May 23, 2024

Thank you all for the answers!! @Stukova Thank you for the suggestion, although I wouldn't want to disable the resizing I think. The option zoomNodesOnZoom seems not to be available in the current react version (1.4.0 beta). In general if I want to have the quickest access to new features it probably makes sense to use the typescript vanilla version, right? :)

from cosmos.

jonsch1 avatar jonsch1 commented on May 23, 2024

That works, thanks!

from cosmos.

jonsch1 avatar jonsch1 commented on May 23, 2024

So, setting scaleNodesOnZoom to false and setting nodeSize to 20 actually solves my cross-browser scaling issue. So i wouldn't mind if you close this issue. :)

from cosmos.

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.