update
Add custom element id as prop for leaderline svg.
#4
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.
This pull request introduces several updates to the project, including enhancements to the
LeaderLine
library, integration of new dependencies, and the addition of basic HTML and CSS for rendering visual elements. The most significant changes involve extending theLeaderLine
functionality to support custom parent elements, updating dependencies inpackage.json
, and creating foundational files for a demo interface.Enhancements to
LeaderLine
library:src/leader-line.js
: ExtendedLeaderLine
to accept acustomElement
parameter, allowing lines to be appended to a specified parent element instead ofbody
. Added logic to handlecustomElement
in multiple methods, including initialization and SVG appending. [1] [2] [3]Dependency updates:
package.json
: Updateduglify-js
dependency from version^3.13.7
to^3.19.3
. Added a comprehensive list of new dependencies required for enhanced functionality. [1] [2]Demo interface setup:
index.html
: Added a basic HTML structure with containers and terminals for visualizingLeaderLine
connections. Included links tostyle.css
andindex.js
.style.css
: Defined styles for the container, terminals, and leader lines, including positioning and background colors.index.js
: Created a demo script to draw a line between two terminal elements using theLeaderLine
library.Environment configuration:
.nvmrc
: Specified Node.js version20.*
to ensure compatibility with the updated dependencies and project setup.Submodule addition:
leader-line
: Added a submodule commit reference to integrate the externalLeaderLine
library into the project.