-
Notifications
You must be signed in to change notification settings - Fork 8
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
Selecting a particular sequence of view options causes graph to shrink to the size of one node #1082
Comments
Starting (actual) window size will determine the initial View setting, so @ceciliazaragoza will retry this with a smaller initial window |
Verified that I have the same issue with @ceciliazaragoza. This issue is hard to debug on local machine. |
After looking at this, it was [re-]discovered that the deployment observation is due to how the deployed site is running a static web page with an To address this bug without constant redeploys, we can set up this environment locally:
After this is done, next steps will then depend on what @ceciliazaragoza discovers |
For the issue with the local |
I am still trying to get the graph to display correctly. The browser recognizes that http://localhost:8080 is the host, but the graph still looks like this when loaded, so there may be something else that is loading incorrectly that is causing the graph to not display.
However, I am able to correctly post the message to localhost:5001. I changed the code to be |
… since empty dimensions are being sent and propogated throughout code before they are received, and will add a Promise to ensure that wait for dimensions to be sent before running the rest of the code for displaying graph.
I have been able to find a solution that does not shrink the nodes to the size of one node, but I receive an error in the console that fit.container is accessing an "undefined width" attribute of grnState.dimensions. This is because I am no longer returning when the dimensions are null in |
@ceciliazaragoza and @dondi will find some time to step through the above scenario; meanwhile, knowing that the triggering action is the selection of Fit to Viewport, @ceciliazaragoza can do a deep dive into the calling sequence starting with that action to pinpoint exactly when/how the empty |
fit_to_viewport_demo.movNow you can fit to viewport without any errors in the console. Previously, the container.css width and height were only updated if the fitWidth and fitHeight were different than the current height, which caused the error of the nodes shrinking down to the size of one node since the width and height of the container were not updated. Instead, fitWidth and fitHeight are set to dimensions if dimensions are not undefined, else fitWidth and fitHeight are set to the current container.width() and container.height() respectively. This solves the concurrency issue of grnState.dimensions being undefined when fitContainer is first called since updateApp (which contains updateViewport and fitContainer) is called again after grnState.dimensions is updated, so eventually fitContainer will be called when grnState.dimensions is not undefined. Question @dondi @kdahlquist : Does the behavior of the window expanding and shrinking when fit to window is enabled look as expected? Updated:
Previous:
|
The behavior in the movie looks fine. I played around with the buggy version on beta to see what it is doing now. Make sure that it is still working properly when "Restrict graph to viewport" is selected. I think that we may need to enforce a minimum size of the viewport when "fit to window" is selected. On beta 7.2.1, if you have "fit to window" selected, the viewport will shrink down to a horizontal or vertical line. I think the minimum size should be at least as big to show the D-pad and Zoom slider with a margin of one node width/height all around them. Allowing it to go smaller than that doesn't really make any sense. |
…p is called again after the grnState.dimensions are set. while grnState.dimensions are undefined, leave the container as the current size in fitContainer, and finally update the size in fitContainer when grnState.dimensions is not undefined
As of right now, I am not experiencing that issue on my version because the minimum size of the browser window is reached that is larger than the size of the D-pad and Zoom slider. The previous Fit to Window functionality did not calculate the size of the window correctly which caused the size of the graph to be smaller than the minimum window size for the browser and into one line. |
#1082: Fixed Fit to Window Functionality
Do this on either production or beta 7.0.8:
It may not have to be this exact sequence to make this happen.
The text was updated successfully, but these errors were encountered: