Skip to content

Commit e79b046

Browse files
committed
Fix toggle maintainAspectRatio
1 parent e4abdee commit e79b046

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

projects/ngx-image-cropper/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ngx-image-cropper",
3-
"version": "9.0.0",
3+
"version": "9.1.1",
44
"description": "An image cropper for Angular",
55
"author": "Martijn Willekens",
66
"repository": {

projects/ngx-image-cropper/src/lib/component/cropper.state.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ export class CropperState {
7171
}
7272

7373
let positionPossiblyChanged = false;
74-
if ((this.options.maintainAspectRatio && options['aspectRatio']) || options['maintainAspectRatio']) {
74+
if ((this.options.maintainAspectRatio && options['aspectRatio']) || 'maintainAspectRatio' in options) {
7575
this.setCropperScaledMinSize();
7676
this.setCropperScaledMaxSize();
7777
if (this.options.maintainAspectRatio && (this.options.resetCropOnAspectRatioChange || !this.aspectRatioIsCorrect())) {

0 commit comments

Comments
 (0)