@micromag/element-image 0.3.120 → 0.3.126
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/index.js +2 -2
- package/lib/index.js +2 -2
- package/package.json +3 -3
package/es/index.js
CHANGED
|
@@ -172,8 +172,8 @@ var Image = function Image(_ref) {
|
|
|
172
172
|
} else {
|
|
173
173
|
var validWidth = width !== null && typeof width === 'number';
|
|
174
174
|
var validHeight = height !== null && typeof height === 'number';
|
|
175
|
-
var ratioWidth = validHeight ? height * mediaRatio : null;
|
|
176
|
-
var ratioHeight = validWidth ? width / mediaRatio : null;
|
|
175
|
+
var ratioWidth = mediaRatio && validHeight ? height * mediaRatio : null;
|
|
176
|
+
var ratioHeight = mediaRatio && validWidth ? width / mediaRatio : null;
|
|
177
177
|
|
|
178
178
|
var _finalWidth = width !== null ? width : ratioWidth;
|
|
179
179
|
|
package/lib/index.js
CHANGED
|
@@ -183,8 +183,8 @@ var Image = function Image(_ref) {
|
|
|
183
183
|
} else {
|
|
184
184
|
var validWidth = width !== null && typeof width === 'number';
|
|
185
185
|
var validHeight = height !== null && typeof height === 'number';
|
|
186
|
-
var ratioWidth = validHeight ? height * mediaRatio : null;
|
|
187
|
-
var ratioHeight = validWidth ? width / mediaRatio : null;
|
|
186
|
+
var ratioWidth = mediaRatio && validHeight ? height * mediaRatio : null;
|
|
187
|
+
var ratioHeight = mediaRatio && validWidth ? width / mediaRatio : null;
|
|
188
188
|
|
|
189
189
|
var _finalWidth = width !== null ? width : ratioWidth;
|
|
190
190
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/element-image",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.126",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@babel/runtime": "^7.13.10",
|
|
52
52
|
"@folklore/size": "^0.1.20",
|
|
53
|
-
"@micromag/core": "^0.3.
|
|
53
|
+
"@micromag/core": "^0.3.126",
|
|
54
54
|
"classnames": "^2.2.6",
|
|
55
55
|
"prop-types": "^15.7.2",
|
|
56
56
|
"react-intl": "^5.12.1",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"publishConfig": {
|
|
60
60
|
"access": "public"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "079203c5850c4aa771bc4fa1c567d2db1bc3ee3d"
|
|
63
63
|
}
|