draught

Drawing tool in ES6 for creating diagrams using D3 with an extensible event driven architecture.

Usage no npm install needed!

<script type="module">
  import draught from 'https://cdn.skypack.dev/draught';
</script>

README

Draught

Travis   npm   License MIT

  • npm: npm install draught --save

Getting Started

import create from 'draught';
import rectangle from 'draught/shape/rectangle';

const element = document.querySelector('svg');
const diagram = create(element, { width: 200, height: 200 });

const rectangle = diagram.render(rectangle).attr({ fill: 'blue' }).sendToBack();
    ```