Open codebeginer opened 6 years ago
Try : $('.image-editor').cropit('imageSrc', 'k.jpg'); instead of $('.image-editor').cropit({'imageState':'k.jpg'});
I also have this problem I tried
$('.image-editor').cropit({
exportZoom: 1.25,
imageBackground: true,
imageBackgroundBorderWidth: 20,
width: 400,
height: 400,
allowDragNDrop: false,
imageState: {
src: 'http://localhost:3000/magisgit/printright/public/storage/projects/240/AoohK1CbmMLuKYaP8lfSsOPBBdRhbvOJB0bQfHY1.jpeg',
},
onZoomChange: (() => {
alert('test');
}),
onOffsetChange: (() => {
alert('two');
}),
});
but it doesnt work, so i tried:
$('.image-editor').cropit('imageSrc', 'http://localhost:3000/magisgit/printright/public/storage/projects/240/AoohK1CbmMLuKYaP8lfSsOPBBdRhbvOJB0bQfHY1.jpeg');
my html mark up is this:
<div class="image-editor">
<div class="cropit-preview"></div>
<br>
<br>
<center>
<span class="fa fa-search-minus zoom-ft"></span>
<input type="range" class="cropit-image-zoom-input">
<span class="fa fa-search-plus zoom-ft"></span>
</center>
<br>
<div class="text-center">
<button class="btn register">
<span v-text="isCropping">Crop Photo</span>
</button>
</div>
</div>
but this still didn't work? what is the problem of my code?
anyone found a solution yet. I'm getting the same problem.
I have tried this option in the demo example of the file but still this does't work. `<!DOCTYPE html>
$form.serialize() =
`