@behance/helicropter
Advanced tools
Comparing version 13.0.1 to 13.0.2
{ | ||
"name": "@behance/helicropter", | ||
"version": "13.0.1", | ||
"version": "13.0.2", | ||
"description": "My helicropter goes \"whosh whosh whosh\"", | ||
@@ -5,0 +5,0 @@ "main": "src/js/index.js", |
@@ -125,4 +125,4 @@ import View from '@behance/beff/View'; | ||
y: Math.max(0, (this._getImageProp('top') * -1) + this._getCropAreaProp('top')), | ||
width: this._cropArea.getWidth(), | ||
height: this._cropArea.getHeight(), | ||
width: Math.max(1, this._cropArea.getWidth()), | ||
height: Math.max(1, this._cropArea.getHeight()), | ||
scale: this._image.getScaleX(), | ||
@@ -129,0 +129,0 @@ }; |
@@ -58,2 +58,22 @@ import CroppingArea from 'CroppingArea'; | ||
}); | ||
it('does not allow height/width less than 1', function() { | ||
spyOn(this.croppingArea, '_getImageProp').and.returnValue(1); | ||
spyOn(this.croppingArea, '_getCropAreaProp').and.returnValue(0); | ||
this.croppingArea._cropArea = { | ||
getWidth: () => 0, | ||
getHeight: () => 0, | ||
}; | ||
this.croppingArea._image = { getScaleX: () => 1.0 }; | ||
expect(this.croppingArea.getCropData()).toEqual({ | ||
x: 0, | ||
y: 0, | ||
width: 1, | ||
height: 1, | ||
scale: 1.0, | ||
}); | ||
}); | ||
}); | ||
@@ -60,0 +80,0 @@ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
8652235
3974