No notes defined.
<div class="sds-cropper">
<img class="img-fluid" src="../../media/snet/cropper/cropper.jpg" alt="" data-cropper>
</div>
<div class="{{ namespace }}cropper{% for mod in modifiers %} {{ mod }}{% endfor %}{% for mod in classes %} {{ mod }}{% endfor %}">
<img class="img-fluid" src="{{ (mediaPath + "/snet/cropper/cropper.jpg") | path }}" alt="" data-cropper>
</div>
export default class CropperResize {
constructor() {
this.fireCropper();
}
fireCropper() {
const cropperImg = document.querySelectorAll('[data-cropper]');
console.log(cropperImg)
cropperImg.forEach((el, i) => {
const cropper = new Cropper(el, {
aspectRatio: 1
});
});
}
}