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

Add the line numbers to the SVG diagram to enable real time tracking #132

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

StefRave
Copy link
Contributor

Added to example test.html (only works in chrome :-():

  • Visualy track elements
  • Click in element selects correct line in editor
  • SVG shows current editor line in SVG

A working example for all browsers can be viewed at: https://stefrave.github.io/js-sequence-diagrams/

@StefRave
Copy link
Contributor Author

This pull request is based on pull request #128

@deftdawg
Copy link

About the only way that could be any cooler, would be if when you clicked on a word, it jumped you to that word in the line too... Awesome stuff though!

@StefRave
Copy link
Contributor Author

Hi, I reimplemented this feature again on version 2.
This feature adds the original line numbers in the sourcefile to the SVG like:
<g data-lineno="3" class="signal ">
This makes it possible to implement interaction between sequence diagram and editor.

As an example: https://stefrave.github.io/js-sequence-diagrams/
When a node in the sequence diagram is clicked the cursor moves to the correct line in the editor. The current line being edited is highlighted in the sequence diagram.

@deftdawg
Copy link

@StefRave We are not worthy! 🤣 Amazing stuff!

@bramp
Copy link
Owner

bramp commented Dec 28, 2016

Awesome addition. I've added a few suggestions to the changes.

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

Successfully merging this pull request may close these issues.

3 participants