Skip to content

Commit 26ca8bb

Browse files
schema validation for new param - autoCropArea (#610)
Co-authored-by: Yogesh <yogesh@celestialsys.com>
1 parent a376569 commit 26ca8bb

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

src/lib/picker.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -752,6 +752,10 @@ export interface PickerCropOptions {
752752
* Force all images to be cropped before uploading.
753753
*/
754754
force?: boolean;
755+
/**
756+
* Auto crop area value between 0 and 1.
757+
*/
758+
autoCropArea?: number;
755759
}
756760

757761
export interface PickerTransformationOptions {

src/schema/picker.schema.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,11 @@ export const PickerParamsSchema = {
333333
aspectRatio: {
334334
type: 'number',
335335
},
336+
autoCropArea: {
337+
type: 'number',
338+
minimum: 0,
339+
maximum: 1,
340+
},
336341
},
337342
},
338343
],

0 commit comments

Comments
 (0)