Skip to content

Commit 3cbdb5f

Browse files
committed
fix: crop issue
1 parent 66109d2 commit 3cbdb5f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/app/upload/crop/crop.component.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,12 @@ export class UploadCropComponent implements OnInit, OnDestroy {
8383
minSize: this.minSize,
8484
onSelect: (c: JcropCrop) => {
8585
this.currentCrop = c;
86+
if (this.currentCrop.y < 0) {
87+
this.currentCrop.y = 0;
88+
}
89+
if (this.currentCrop.x < 0) {
90+
this.currentCrop.x = 0;
91+
}
8692
this.updateSelectionText();
8793
},
8894
setSelect: [

0 commit comments

Comments
 (0)