Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
OK, here's the final PR in the Diagram series for #8 . From now on it should be a lot easier to track work in progress.
This series of commits creates a functioning Diagram class based on the original code. The constructor takes two arguments - sets, and config. Currently the constructor works exactly the same as in the old version (finds
#diagramFrame
and appends the SVG to it) but now it's in a state where the dom-based manipulation/d3 can gradually be removed. After that it would make sense to separate the loadDiagram method into two methods - create (creates an SVGElement based on the sets and config, and sets it as the value ofthis.element
and render (takes one argument - the ID of the target element, finds that element, and appends this.element to it.)I made a test page (a pared down version of index.html) where the diagram is being rendered by calling new Diagram (lines 1359 - 1375 of javascript.js).
Since another contributor was interested in converting to Typescript, and Diagram/SetService would be the obvious place to start, I'm happy to have him run with it for a bit!
I'm not sure why the extra commits are showing up (Ive been struggling a lot with git today) but hopefully I can figure out how to resolve it. The new work on this PR vs prior ones that were merged starts at commit 18d6083.