Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
init: (imageElement: HTMLImageElement, valueAccessor) => {
const observable = valueAccessor();
const cropperInstance = new Cropper.default(imageElement, {
// aspectRatio: 1,
viewMode: 1,
responsive: true,
ready: () => {
this["croppable"] = true;
}
});
observable(cropperInstance);
const onResize = () => {
cropperInstance["resize"]();
};
eventManager.addEventListener("onEditorResize", onResize);