dom-connector-library
v0.3.1
Published
Tiny library to draw connections between DOM element. Still proof of concept, under development.
Readme
DOM Connector library
Tiny library to draw connections between DOM element. Still proof of concept, under development.
NPM scripts
npm t: Run test suitenpm start: Runsnpm run buildin watch modenpm run test:watch: Run test suite in interactive watch modenpm run test:prod: Run linting and generate coveragenpm run build: Generage bundles and typings, create docsnpm run lint: Lints code
Build and test
npm run buildopen example/index.html
Also visible here
Usage
#e1, #e2 {
width: 100px;
height: 100px;
margin: 20px;
background-color: #DDD;
}<div id="e1"></div>
<div id="e2"></div>const connector = DomConnector.connect(
document.getElementById('e1'),
document.getElementById('e2'),
{ from: 'bottom-middle', to: 'top-middle', className: 'line-join' }
);Credits
Sébastien Gruhier [email protected]
Boilerplate
Based on https://github.com/alexjoverm/typescript-library-starter starter kit with some modifications
