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.
It would be extremely useful to bidirectionally map span information to diagram elements so that
gfx_defines
, which in the optimized form appears once but has two sources).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.