Skip to content

Commit

Permalink
更新裁切圆形测试
Browse files Browse the repository at this point in the history
  • Loading branch information
more-strive committed Jul 5, 2023
1 parent 196ce4d commit f550113
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/extension/mixins/cropping.mixin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ export function extendWithCropImage(CropImage: any) {
this.__isCropping = value;
isCropping.value = value
if (value) {

this.clipPath = '';
defaultCursor = fabricCanvas.defaultCursor;
fabricCanvas.defaultCursor = 'move';
// handle crop mode enter
Expand Down Expand Up @@ -338,6 +338,13 @@ export function extendWithCropImage(CropImage: any) {
this.controls = standardControlSet;
this.setCoords();
fireCropImageEvent(this);
this.absolutePositioned = true
this.clipPath = new fabric.Path('M 0 -100 A 50 50 0 1 1 0 100 A 50 50 0 1 1 0 -100 Z', {
originX: 'center',
originY: 'center',
fill: '',
})
console.log('crop end...')
}
},
});
Expand Down

0 comments on commit f550113

Please sign in to comment.