1.1.0 • Published 4 years ago

drawtheline v1.1.0

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

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);