@micromag/core 0.3.10 → 0.3.11
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/components.js +3 -3
- package/lib/components.js +3 -3
- package/package.json +2 -2
package/es/components.js
CHANGED
|
@@ -3380,8 +3380,8 @@ var ScreenSizer = function ScreenSizer(_ref) {
|
|
|
3380
3380
|
}
|
|
3381
3381
|
|
|
3382
3382
|
var screenRatio = screenWidth / screenHeight;
|
|
3383
|
-
var finalContainerWidth =
|
|
3384
|
-
var finalContainerHeight =
|
|
3383
|
+
var finalContainerWidth = hasSize ? width || containerHeight * screenRatio : containerWidth;
|
|
3384
|
+
var finalContainerHeight = hasSize ? height || containerWidth / screenRatio : containerWidth / screenRatio;
|
|
3385
3385
|
|
|
3386
3386
|
if (fit === null) {
|
|
3387
3387
|
var _screenScale = finalContainerWidth / screenWidth;
|
|
@@ -3407,7 +3407,7 @@ var ScreenSizer = function ScreenSizer(_ref) {
|
|
|
3407
3407
|
height: finalContainerHeight,
|
|
3408
3408
|
transform: "scale(".concat(screenScale, ") translate(").concat(x, "px, ").concat(y, "px)")
|
|
3409
3409
|
};
|
|
3410
|
-
}, [screenWidth, screenHeight, width, height, fit, calculatedWidth, calculatedHeight]),
|
|
3410
|
+
}, [screenWidth, screenHeight, width, height, fit, calculatedWidth, calculatedHeight, hasSize]),
|
|
3411
3411
|
_useMemo$width = _useMemo.width,
|
|
3412
3412
|
frameWidth = _useMemo$width === void 0 ? null : _useMemo$width,
|
|
3413
3413
|
_useMemo$height = _useMemo.height,
|
package/lib/components.js
CHANGED
|
@@ -3403,8 +3403,8 @@ var ScreenSizer = function ScreenSizer(_ref) {
|
|
|
3403
3403
|
}
|
|
3404
3404
|
|
|
3405
3405
|
var screenRatio = screenWidth / screenHeight;
|
|
3406
|
-
var finalContainerWidth =
|
|
3407
|
-
var finalContainerHeight =
|
|
3406
|
+
var finalContainerWidth = hasSize ? width || containerHeight * screenRatio : containerWidth;
|
|
3407
|
+
var finalContainerHeight = hasSize ? height || containerWidth / screenRatio : containerWidth / screenRatio;
|
|
3408
3408
|
|
|
3409
3409
|
if (fit === null) {
|
|
3410
3410
|
var _screenScale = finalContainerWidth / screenWidth;
|
|
@@ -3430,7 +3430,7 @@ var ScreenSizer = function ScreenSizer(_ref) {
|
|
|
3430
3430
|
height: finalContainerHeight,
|
|
3431
3431
|
transform: "scale(".concat(screenScale, ") translate(").concat(x, "px, ").concat(y, "px)")
|
|
3432
3432
|
};
|
|
3433
|
-
}, [screenWidth, screenHeight, width, height, fit, calculatedWidth, calculatedHeight]),
|
|
3433
|
+
}, [screenWidth, screenHeight, width, height, fit, calculatedWidth, calculatedHeight, hasSize]),
|
|
3434
3434
|
_useMemo$width = _useMemo.width,
|
|
3435
3435
|
frameWidth = _useMemo$width === void 0 ? null : _useMemo$width,
|
|
3436
3436
|
_useMemo$height = _useMemo.height,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@micromag/core",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.11",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"javascript"
|
|
@@ -132,5 +132,5 @@
|
|
|
132
132
|
"publishConfig": {
|
|
133
133
|
"access": "public"
|
|
134
134
|
},
|
|
135
|
-
"gitHead": "
|
|
135
|
+
"gitHead": "4baa4392185262ac19705bab9f21d4623a975249"
|
|
136
136
|
}
|