drawtheline

Sketch simple line drawing in SVG.

Usage no npm install needed!

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

README

drawtheline

✏️ Sketch simple line drawings in SVG.

NPM Version

Install

$ npm install drawtheline
<script type="module" src="https://unpkg.com/drawtheline@1.1.0/index.js"></script>
<script>
import {
    inputDownEvent,
    inputUpEvent
} from 'https://unpkg.com/drawtheline@1.1.0/index.js';
</script>

Usage

import { inputDownEvent, inputUpEvent } from 'drawtheline';

const svg = document.querySelector('svg');

svg.addEventListener('mousedown', inputDownEvent);
svg.addEventListener('touchstart', inputDownEvent);