Closed thomthom closed 7 years ago
It would be feasible to add a regexp for arrays of points (containing nothing but points). But then you also want to know which coordinates correspond to a specific visualized point.
but maybe if you hovered over the array brackets it displayed everything?
That is a good idea.
I need to poke into your visualisation engine for this extension. I expect when I start poking more into this I'll want to add more visualizers. (For the new InstancePath etc.)
I'd rather send our PRs than open requests.
It would probably be best to have a better extensible highlighter infrastructure (use registered highlighters instead of a if conditions). It's a bit tricky, because it is scattered in several places:
<span>
element) instead of splitting them into several tokens.Arrays cannot be recognized by regular expressions because they stretch over multiple html elements (multiple tokens). I have some working code that uses a different approach and traverses the html nodes.
Added branch feature-highlight_array
Merged feature branch with commit eb18ea953fc552b1a9fe1433f67606da39886a68
Often you have arrays of points, representing polygons.
Do you think it'd be possible to detect such arrays in the output buffer and create a highlighter for that? Hover over each point is nice to pick out individual points, but maybe if you hovered over the array brackets it displayed everything?
Challenge is that some points you want to just display a point set, some times segments. Maybe simple toggle modes in the visualizer?