Comments (4)
Got it. You should better adjust the React Flow viewport by using setViewport
https://reactflow.dev/api-reference/types/react-flow-instance#set-viewport instead of scaling the parent.
from xyflow.
ok thank you :)
from xyflow.
If the scale changes, you would need to call updateNodeInternals
for all nodes. What is the use case for this?
from xyflow.
Hey @moklick , thanks for getting back to me so quickly. I gave updateNodeInternals a shot, but it didn't quite solve my issues. Here's what I'm dealing with: I'm using React Flow alongside another graph. When you click on a specific part of the graph, it should show different data depending on what you clicked. Plus, I've got zoom controls to scale the graph + the current displayed flow in or out if the info's too big for the window.
Right now, I've got things sort of working by grabbing the zoomRatio and using setViewPort in React Flow. But ideally, I'd like to be able to update the data without needing to worry about zoom ratios
from xyflow.
Related Issues (20)
- FitViewOptions not working with Controls component HOT 2
- nodesInitialized will fire before node measurements are exposed since xyflow 12-13 HOT 6
- Drag selection is dropped when mouse is outside the pane or when mouse encounters outside elements HOT 2
- Add "Auto Layout" example for Svelte Flow
- Node rendering inconsistent between Mac and Windows with Chrome HOT 1
- Svelte: some `SvelteFlow` component events not strongly typed HOT 2
- Add `avoidNodes` prop to getSmoothStepPath, getBezierPath and getSimpleBezierPath HOT 1
- on:connect isn't working as intend to HOT 7
- Restoring a graph with dynamic handles works sparodically HOT 8
- ConnectionDragThreshold
- Add "Reset zoom to 1" button as part of `Controls` HOT 1
- The edge style is wrong when dragging HOT 1
- Node text getting blurred when another div is scrolled (svelteflow) HOT 1
- autoLayout
- Minimap's onNodeClick doesn't work when using a custom minimap node HOT 2
- RFC - Spatial Queries & Virtualisation in XYFlow HOT 7
- Detaching a node from its parent on drag start produces unexpected positions. (v11 only) HOT 1
- Node gets unselected immediately after selecting. HOT 1
- React flow fails when execute inside a Microfrontend with Module federation
- getEdges return connections, not edges HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from xyflow.