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

Hotwire CodeSpan to diagram-elements #10

Open
lukaslueg opened this issue Aug 15, 2018 · 0 comments
Open

Hotwire CodeSpan to diagram-elements #10

lukaslueg opened this issue Aug 15, 2018 · 0 comments

Comments

@lukaslueg
Copy link
Owner

It would be extremely useful to bidirectionally map span information to diagram elements so that

  • we can highlight sections in the source-text which correspond to a diagram-element. The user might pick (mouseover) an element; the corresponding sections in the source should be highlighted; there may be multiple such sections in different arms (think of the "vertex" terminal in gfx_defines, which in the optimized form appears once but has two sources).
  • we can highlight sections of the diagram which correspond to a syntax-element. The user might select parts of the text. The diagram-elements which are sourced by that part of the text should be highlighted.

This requires us to acquire, collect and map CodeSpan-information up to the point where we generate a diagram. The code to add custom data-attributes to an SVG-element is already in place. In addition to a diagram, we also give back some form of code-map. Some JS-code can then control the blinkenlights via CSS-rules regarding the affected SVG-nodes.

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

1 participant