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

Diagram live editing/updating #45

Closed
mattwright324 opened this issue Feb 2, 2020 · 1 comment · Fixed by #74
Closed

Diagram live editing/updating #45

mattwright324 opened this issue Feb 2, 2020 · 1 comment · Fixed by #74

Comments

@mattwright324
Copy link

It would be convenient for the diagram to update live as you make changes to any of the inputs. Currently, without hitting the preview button I have to click outside the form/inputs section for changes to be seen in the diagram.

I realize if the process is browser heavy it makes sense to do processing as infrequent as possible and how it works currently does that. An option to enable live editing would be very helpful.

In the mean time running the following in the browser console does the trick for me

document.getElementById("flows_in").onkeyup = process_sankey;
@nowthis
Copy link
Owner

nowthis commented Apr 26, 2021

(Side note: Just pressing the 'tab' key also ought to trigger an update, then you can shift-tab back to the field you were in without having to use the mouse at all.)

On the main point:

It's not difficult to make it update live, but I would not want it to update with every keystroke, as someone may be typing away speedily and triggering unnecessary error messages & drastic diagram changes from temporarily invalid syntax, when they're about to make it valid with a few more characters.

I do think some sort of update-trigger with a debounce guard would satisfy all parties.. as in, if the user has stopped typing for some brief period of time (say, 0.4 seconds), then it's ok to render an update with the new data.

Marking this medium-priority. I do agree it would be an improvement.

JeroenvdV added a commit to JeroenvdV/sankeymatic that referenced this issue Dec 6, 2023
nowthis added a commit that referenced this issue Dec 26, 2023
Feature: Edits to input data produce live diagram updates. Fixes #45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants