Skip to content
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

Fix the issue where minimap content gets clipped #1600

Merged
merged 1 commit into from
Nov 8, 2018

Conversation

stephanwlee
Copy link
Contributor

@stephanwlee stephanwlee commented Nov 8, 2018

Bug: #1598
Cause: the graph contains no main graph node and all nodes are
auxilliary nodes. As a result, the drawn nodes are shifted right by
predefined amount for visuals. When measuring the bounding box of the
scene to draw the minimap, we were measuring using
SVGGraphicsElement.getBBox which returned BBox without any whitespace.
As a result, although we wanted the width from the origin to right edge
of the right most node, we were omitting the origin to left most edge
of the content resulting in clipped content in the minimap.

Fixes #1598.

Bug: tensorflow#1574
Cause: the graph contains no main graph node and all nodes are
auxilliary nodes. As a result, the drawn nodes are shifted right by
predefined amount for visuals. When measuring the bounding box of the
scene to draw the minimap, we were measuring using
SVGGraphicsElement.getBBox which returned BBox without any whitespace.
As a result, although we wanted the width from the origin to right edge
of the right most node, we were omitting the origin to left most edge
of the content resulting in clipped content in the minimap.
@stephanwlee stephanwlee merged commit ebda80d into tensorflow:master Nov 8, 2018
@stephanwlee stephanwlee deleted the minimap branch November 8, 2018 16:59
@PositronEternal
Copy link

when expanding the SIR node in the provided issue reproduction event, Download PNG leaves a wide white space on the left.

@stephanwlee
Copy link
Contributor Author

@PositronEternal that is how I understood the code which may not be the best for the UX. Do you expect the PNG to reflect what it roughly looks like when you "Fit to Screen" or do you expect to see just the graph?

@PositronEternal
Copy link

@stephanwlee I was expecting to see just the graph. Fit-to-screen moves the graph off browser for me. That is likely due to my virtual desktop size across multiple monitors and different monitor configurations as well, so unlikely to affect most users if this is the case. I was able to grab what I needed and can edit it externally. The svg branch is likely to fit my needs best, so I'll try that out. Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants