cropperjs icon indicating copy to clipboard operation
cropperjs copied to clipboard

Probleme with image base64 and tranform

Open nbao opened this issue 10 months ago • 1 comments

Describe the bug user cdn cropperjs version 1.6.1 image is data:image base64 cavans with transformY is too much it must set value 0 To Reproduce Steps to reproduce the behavior: use simple script window.addEventListener("DOMContentLoaded", () => { const capturedImage = document.getElementById("captured-image"); let cropper = new Cropper(capturedImage, { ready: () => { this["croppable"] = true; }, }); });

Debug with event event.detail.x: 119.50000000000004 event.detail.y: 91.89999999999996 event.detail.width: 2150.9999999999995 event.detail.height: 1654.2 event.detail.rotate: 0 event.detail.scaleX: 1 event.detail.scaleY: 1

Screenshots If applicable, add screenshots to help explain your problem. Capture d'écran 2024-03-24 114021

Additional context if transformY = 0 it's perfect

nbao avatar Mar 24 '24 10:03 nbao

Please follow this example step by step: https://github.com/fengyuanchen/cropperjs?tab=readme-ov-file#example

fengyuanchen avatar Apr 08 '24 07:04 fengyuanchen