Reputation: 1
Im using Croppie js for import of logos, and my problem is, the uploaded image can be zoom way out, to a point where the picture is tiny. I tryed using minZoom and maxZoom but only maxZoom semse to work. and when it is zoomed out the picture is in the down left corner and cont be moved. croppie with image zoomed
const croppieOptions = {
enableExif: true,
enforceBoundary: true,
maxZoom: 0.3,
minZoom: 0.2,
viewport: {
width: (width / scale) + 100,
height: (height / scale) + 100,
type: "square"
},
boundary: {
width: (width / scale) + 200,
height: (height / scale) + 200
}
}
the croppie optiont, should be right ? cant see what is wrong anyway, the widht, hight and, scale comes from som screen size calc, not shure how it works but it sems to work. I am the one who made it just the guy set to fix it...
The goal is just to limit the amount the slide can zoom in and out, and keep the image centered, but i have no clue, as im not used to js.
Upvotes: 0
Views: 26