Skip to content

Conversation

Abidit
Copy link
Collaborator

@Abidit Abidit commented Jun 12, 2025

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 the LeaderLine functionality to support custom parent elements, updating dependencies in package.json, and creating foundational files for a demo interface.

var line1 = new LeaderLine(
  document.getElementById("terminal-1"),
  document.getElementById("terminal-2"),
  "line-wrapper"
);

image

Enhancements to LeaderLine library:

  • src/leader-line.js: Extended LeaderLine to accept a customElement parameter, allowing lines to be appended to a specified parent element instead of body. Added logic to handle customElement in multiple methods, including initialization and SVG appending. [1] [2] [3]

Dependency updates:

  • package.json: Updated uglify-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 visualizing LeaderLine connections. Included links to style.css and index.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 the LeaderLine library.

Environment configuration:

  • .nvmrc: Specified Node.js version 20.* to ensure compatibility with the updated dependencies and project setup.

Submodule addition:

  • leader-line: Added a submodule commit reference to integrate the external LeaderLine library into the project.

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.

1 participant