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

[feature] add zoom ability to svg parse tree #18

Open
parrt opened this issue Sep 23, 2022 · 5 comments
Open

[feature] add zoom ability to svg parse tree #18

parrt opened this issue Sep 23, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@parrt
Copy link
Member

parrt commented Sep 23, 2022

or make it an img tag referring to url so users can open in another tab?

Hmm... can use window zoom now...maybe don't need.

@parrt parrt added the enhancement New feature or request label Sep 23, 2022
@kaby76
Copy link
Collaborator

kaby76 commented Oct 15, 2022

I have something that you might look at and refine to add pan and zoom of the parse tree. Basically, it replaces the <div id="svgtree"> with a <canvas>. When the parse is done, it creates an Image control, sets the source with the svg, and draws it. https://github.com/kaby76/antlr4-lab/tree/combined

Working over at http://134.209.209.215/

@parrt
Copy link
Member Author

parrt commented Oct 15, 2022

Hmm...sounds good but downloaded image is now png not svg and lower quality. Hmm...let me see about just scroll bars. Now we can "open in another tab" so expanding is no problem.

download

@parrt
Copy link
Member Author

parrt commented Oct 15, 2022

ok, i'm gonna leave as-is and close this. Can expand window to see more. zoom of browser gives us the functionality we need. can also open in new tab for more control.

@parrt parrt closed this as completed Oct 15, 2022
@kaby76
Copy link
Collaborator

kaby76 commented Oct 15, 2022

Browser-level pan and zoom work, but I think it would be better with a pan and zoom on the graph that doesn't also affect all other controls in the UI, e.g., the text boxes. Yes, "open in new tab" works, but it's not an obvious workaround (I overlooked trying that). Will play around with it further for my edification.

@parrt
Copy link
Member Author

parrt commented Oct 16, 2022

Hmm...yes, let's keep this open as something interesting my pop-up. The previous iframe solution was terrible but possibly just setting the width or something might work.

@parrt parrt reopened this Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants