-
Notifications
You must be signed in to change notification settings - Fork 576
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch '3.x' into fix/list-error-deleting-role
- Loading branch information
Showing
9 changed files
with
843 additions
and
359 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -181,7 +181,21 @@ | |
}, | ||
initCrop: function () { | ||
const crop = this.toNaturalCrop(this.crop) | ||
this.cropper.setData(crop) | ||
// Mike ([email protected]) -- | ||
// | ||
// it seems due to rounding errors(?) that sometimes | ||
// the x position can be reset incorrectly | ||
// see: https://github.com/fengyuanchen/cropperjs/issues/1057 | ||
// | ||
// from my testing it seems to be a little inconsistent and unpredictable | ||
// I guess you just need for the rounding error to happen | ||
// But, it seems setting the properties individually avoids this... | ||
// | ||
// -- Mike ([email protected]) | ||
this.cropper.setData({ x: crop.x }) | ||
this.cropper.setData({ y: crop.y }) | ||
this.cropper.setData({ width: crop.width }) | ||
this.cropper.setData({ height: crop.height }) | ||
}, | ||
test: function () { | ||
const crop = this.toNaturalCrop({ x: 0, y: 0, width: 380, height: 475 }) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.