tinycrop
tinycrop copied to clipboard
how can I use var Crop = require('tinycrop') in the browser?
where should I put the 'var Crop = require('tinycrop')' line? I don't see it in the demo's source code, not sure what I should do with it.
let crop = tinycrop.create({
parent: '#mount',
image: 'images/portrait.jpg',
bounds: {
width: '100%',
height: '50%'
},
backgroundColors: ['#fff', '#f3f3f3'],
selection: {
color: 'red',
activeColor: 'blue',
aspectRatio: 4 / 3,
minWidth: 200,
minHeight: 300,
width: 400,
height: 500,
x: 100,
y: 500
},
onInit: () => { console.log('Initialised') }
});