-
Notifications
You must be signed in to change notification settings - Fork 1
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
Cull labels when not readable #267
Conversation
✅ Deploy Preview for prefect-graphs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -59,8 +59,8 @@ export async function flowRunContainerFactory(node: RunGraphNode) { | |||
]) | |||
|
|||
nodesContainer.visible = true | |||
nodesContainer.once('rendered', () => cull()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noticed this wasn't working before. Need to wait until AFTER everything is rendered before calling cull
This made me realize this is highly inefficient to render things and then cull them. But its working for now. It would be much more efficient to not render things initially and then render them if they are visible. Think we could accomplish that by setting renderable = false
on nodes when creating them (before adding them as children). Might mess with that later but for now this works well. Just a bad fps drop when you open a sub node with a lot of nodes because they must all be rendered and then once they are culled the fps jumps back up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that when a flow is first drawn, all nodes are made visible. I guess it does matter for labels in this case though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, its rendered and then culled. Which is my point here. Unless you're getting at something else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Na at first I thought you may be thinking about the nodes, which will all be visible at first anyway. Ignore me, haha.
@@ -59,8 +59,8 @@ export async function flowRunContainerFactory(node: RunGraphNode) { | |||
]) | |||
|
|||
nodesContainer.visible = true | |||
nodesContainer.once('rendered', () => cull()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that when a flow is first drawn, all nodes are made visible. I guess it does matter for labels in this case though.
Description
Makes labels not visible when the viewport is lower than a 0.2 scale. At this scale labels are not readable. Helps increase performance when zoomed out and many labels would be rendered.