Croppie
Croppie copied to clipboard
I'd like to have some more documentation on bind --> points parameters
Following documentation on https://foliotek.github.io/Croppie/ --> "points Array of points that translate into [topLeftX, topLeftY, bottomRightX, bottomRightY] "
I try to figure out what all this mean... topLeftX of what? Of the image regarding boundary? Or vice-versa? Can I have a drawing explaining that topic which could help to have a better understanding?
Thank Richard
Ok, after few tests, I think I might catch it... It looks like to be the coordinates (e.g. topLeftX) of the image inside the boundary. The boundary acts as a cartesian system, with 0,0 located on bottom left of the boundary.
I don't get it... how can I center a file with that system?
@monkeymonk Croppie automatically tries to center the image when you bind to it. You can see the code here: https://github.com/Foliotek/Croppie/blob/master/croppie.js#L1130
It appears that left,top,width,height are relate to the bound image. boundary, viewport & zoom appear to be applied afterward