Cropper

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>
  • Content:
    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
    			});
    		});
    	}
    }
  • URL: /components/raw/snet-cropper/CropperResize.js
  • Filesystem Path: components/snet/molecules/cropper/CropperResize.js
  • Size: 297 Bytes