1.2.6 • Published 5 years ago
canvas-tailor v1.2.6
API
// new an instance
let tailor = new Tailor(<element container>)
// get img from input element, return a Promise. you can use "then" get the moment when img was loaded
let promise = tailor.loadImg(<event.target.files[0]>)
// accept arguments "size" represent pixels of picture, and return a Promise.
tailor.cut(size)