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

Normalize coordinates on save #423

Open
techtonik opened this issue Jun 9, 2016 · 10 comments
Open

Normalize coordinates on save #423

techtonik opened this issue Jun 9, 2016 · 10 comments

Comments

@techtonik
Copy link
Contributor

I see the output, but graph pane is empty. =/ No output in terminal or console window.

barbox.ndbx.zip

@fdb
Copy link
Member

fdb commented Jun 20, 2016

Try zooming out 😄

screen shot 2016-06-20 at 10 45 55

@techtonik
Copy link
Contributor Author

How to do this?

@techtonik
Copy link
Contributor Author

Mouse-wheel helped. =) But it looks like it is a bug with Nodebox save ability.

@techtonik
Copy link
Contributor Author

If you save the file and then reload it, zoom level will be reset and box will be lost again.

@techtonik techtonik changed the title Can't restore saved network Doesn't restore zoom level Jun 20, 2016
@fdb
Copy link
Member

fdb commented Jun 20, 2016

Yes — NodeBox doesn't keep the location of where you zoomed. If you have nodes that you move outside of the standard box they appear to be hidden. In your case the node is at location 1,-1, so just off-screen.

A solution we do is to move the box back to the "reset" position. In your case it means panning the view a little bit "up" (so holding spacebar and dragging down), then moving the node down one or two squares.

@techtonik
Copy link
Contributor Author

Move manually? Why don't adjust all coordinates to 0,0 coordinate on save?

(another bug - holding spacebar with down works only for half of the second, then everything freezes)

@techtonik techtonik changed the title Doesn't restore zoom level Normalize coordinates on save Jun 28, 2016
@techtonik
Copy link
Contributor Author

Saved nodes can be panned on save, but it looks like writer is not the best place to do this.

@fdb
Copy link
Member

fdb commented Jun 29, 2016

"Panning" on save sounds interesting. However, what happens if the bounding box of available nodes is bigger than that of the view? Do we just make sure that the top-left node is on 0,0?

@techtonik
Copy link
Contributor Author

If bounding box is bigger, Nodebox still resets view to 0,0 on load, so placing top-left node there helps to unwind the graph after this jump.

@fdb
Copy link
Member

fdb commented Jun 29, 2016

Hmmm that could work....

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

No branches or pull requests

2 participants