/canvas-draw

使用canvas手写签名或绘图--支持pc和mobile端、支持横屏。修改为es5直接引入使用的形式。

Primary LanguageJavaScriptMIT LicenseMIT

canvas-draw

License MIT

How to use

<canvas id="canvasBox" style="width: 400px;height: 400px"></canvas>
<button onclick="downloadDraw()">download</button>
<!--just for dev-->
<script src="http://s.ljb.work/libs/draw-es5.js"></script>

<script>
    const canvas = document.getElementById('canvasBox');
    var draw = new Draw(canvas);
    
    function downloadDraw() {
      draw.downloadPNGImage(draw.getPNGImage());
    }
</script>

More detail

更多详情请查看原始ropo。

License

Released under MIT LICENSE。