fixed cut
This commit is contained in:
@@ -700,8 +700,14 @@ document.addEventListener("DOMContentLoaded", function () {
|
||||
const img = croppedImage;
|
||||
const cropX = (cropRect.left - img.left) / img.scaleX;
|
||||
const cropY = (cropRect.top - img.top) / img.scaleY;
|
||||
const cropWidth = cropRect.width / img.scaleX;
|
||||
const cropHeight = cropRect.height / img.scaleY;
|
||||
const cropWidth = (cropRect.width * cropRect.scaleX) / img.scaleX;
|
||||
const cropHeight = (cropRect.height * cropRect.scaleY) / img.scaleY;
|
||||
console.log("Parametri di ritaglio:", {
|
||||
cropX,
|
||||
cropY,
|
||||
cropWidth,
|
||||
cropHeight,
|
||||
});
|
||||
|
||||
// Crea un'immagine ritagliata
|
||||
fabric.Image.fromURL(
|
||||
|
||||
Reference in New Issue
Block a user