P5-2705 - public crop function can now remove aperture transparency
This commit is contained in:
Vendored
+7
-1
@@ -1337,7 +1337,9 @@ function ImageEditor(canvasId, args) {
|
||||
* @param {string} unit cm|inch
|
||||
* @return {ImageEditor}
|
||||
*/
|
||||
this.crop = function (width, height, unit) {
|
||||
this.crop = function (width, height, unit, removeTransparency) {
|
||||
removeTransparency = typeof removeTransparency !== 'undefined' ? removeTransparency : false;
|
||||
|
||||
if (!width || !height) {
|
||||
return this;
|
||||
}
|
||||
@@ -1354,6 +1356,10 @@ function ImageEditor(canvasId, args) {
|
||||
_canvas.getImage().__cropped = false;
|
||||
}
|
||||
|
||||
if (removeTransparency) {
|
||||
_canvas.getApertures().setTransparent(false);
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user