jsyg-cropandresize

1.0.0 • Public • Published

JSYG.CropAndResize

Crop and resize image with JSYG framework

Demo

http://yannickbochatay.github.io/JSYG.CropAndResize/

Installation

npm install jsyg-cropandresize

Example with module bundler

<link rel="stylesheet" href="node_modules/jsyg-editor/JSYG.Editor.css"/>

<svg width="620" height="620" id="content">
    <image xlink:href="image.jpg" width="620" height="620"/>
</svg>
import CropAndResize from "jsyg-cropandresize"

let crop = new CropAndResize("#myImage");
            
crop.enable();
            
document.querySelector('#myButton').addEventListener("dblclick",function() {

    crop.toCanvas().then(function(canvas) {
        document.body.appendChild(canvas);
    });
});

Package Sidebar

Install

npm i jsyg-cropandresize

Weekly Downloads

249

Version

1.0.0

License

MIT

Unpacked Size

71.4 kB

Total Files

6

Last publish

Collaborators

  • ybochatay