@nativescript-community/ui-image 4.3.1 → 4.3.2
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/CHANGELOG.md
CHANGED
@@ -3,6 +3,17 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [4.3.2](https://github.com/nativescript-community/ui-image/compare/v4.3.1...v4.3.2) (2022-07-15)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* **image:** imageRotation scaling fix ([2f12172](https://github.com/nativescript-community/ui-image/commit/2f12172c022c9e6122420763a43b68a2bc137503))
|
12
|
+
|
13
|
+
|
14
|
+
|
15
|
+
|
16
|
+
|
6
17
|
## [4.3.1](https://github.com/nativescript-community/ui-image/compare/v4.3.0...v4.3.1) (2022-07-14)
|
7
18
|
|
8
19
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nativescript-community/ui-image",
|
3
|
-
"version": "4.3.
|
3
|
+
"version": "4.3.2",
|
4
4
|
"description": "Advanced and efficient image display plugin which uses Fresco (Android) and SDWebImage (iOS) to implement caching, placeholders, image effects, and much more.",
|
5
5
|
"main": "./index",
|
6
6
|
"sideEffects": false,
|
@@ -44,5 +44,5 @@
|
|
44
44
|
},
|
45
45
|
"license": "Apache-2.0",
|
46
46
|
"readmeFilename": "README.md",
|
47
|
-
"gitHead": "
|
47
|
+
"gitHead": "0c463c971b84b168d620d8b500025b3b908e9710"
|
48
48
|
}
|
@@ -144,13 +144,18 @@ public class ScalingUtils {
|
|
144
144
|
float focusY) {
|
145
145
|
float sX = (float) parentRect.width() / (float) childWidth;
|
146
146
|
float sY = (float) parentRect.height() / (float) childHeight;
|
147
|
-
float rotationDelta = _imageRotation % 180;
|
148
|
-
if (rotationDelta !=
|
147
|
+
float rotationDelta = (90 - (_imageRotation % 180))/90.0f;
|
148
|
+
if (rotationDelta != 1) {
|
149
149
|
float destSX = (float) parentRect.width() / (float) childHeight;
|
150
150
|
float destSY = (float) parentRect.height() / (float) childWidth;
|
151
|
-
|
152
|
-
sX =
|
153
|
-
sY =
|
151
|
+
if (rotationDelta < 0) {
|
152
|
+
sX = destSX + rotationDelta * (destSX - sX);
|
153
|
+
sY = destSY + rotationDelta * (destSY - sY);
|
154
|
+
} else {
|
155
|
+
sX = sX + (1 - rotationDelta) * (destSX - sX);
|
156
|
+
sY = sY + (1 - rotationDelta) * (destSY - sY);
|
157
|
+
}
|
158
|
+
|
154
159
|
}
|
155
160
|
getTransformImpl(outTransform, parentRect, childWidth, childHeight, focusX, focusY, sX, sY);
|
156
161
|
if (_imageMatrix != null) {
|
Binary file
|