-
-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Examples are not beginner friendly #318
Comments
There is a little button "Open in Codesandbox" in the bottom right corner that shows the whole code of that example: https://codesandbox.io/s/zbu68r?file=/App.js&from-sandpack=true. But you have a good point here. It's not very beginner friendly. We will keep this open for now. |
Adding to this: a page on coordinates (both pixel as well as react-flow) and width/height and how to retrieve them. (latest hurdles for me:
A page dedicated to this subject with code examples would be very helpful for beginners. Another possible help page might be on strategies for handling dynamic re-layouting (for example while an textarea field inside a custom node is edited, growing and growing to overlap other nodes). Both typescript and plain JS code for all examples would also be great I think. |
@raarts FYI: Custom Nodes receive // props that get passed to a custom node
export interface NodeProps<T = any> {
id: string;
type: string;
data: T;
selected: boolean;
isConnectable: boolean;
xPos: number;
yPos: number;
dragging: boolean;
zIndex: number;
targetPosition?: Position;
sourcePosition?: Position;
dragHandle?: string;
} |
@bcakmakoglu Yes, I know, but I needed it in browser pixels so I gathered I needed something like a reverse project() function. There isn't one, so I ended up just copying it out of the reactflow sourcecode, and reverse it myself. |
Describe the Bug
The demo code on https://reactflow.dev/docs/examples/overview/ does not run correctly on the latest version because of the missing width and height
Your Example Website or App
No response
Steps to Reproduce the Bug or Issue
npm init react-app <app_name>
App.js
andinitial-elements.js
from https://reactflow.dev/docs/examples/overview/npm start
Expected behavior
What's shown in the feature overview
Screenshots or Videos
The app worked after adding the height
Platform
Additional context
No response
The text was updated successfully, but these errors were encountered: