@effing/canvas 0.24.1 → 0.24.3
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/dist/index.js +3 -4
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -72,6 +72,7 @@ var INHERITABLE_PROPS = [
|
|
|
72
72
|
"lineClamp",
|
|
73
73
|
"textBoxTrim",
|
|
74
74
|
"textBoxEdge",
|
|
75
|
+
"textShadow",
|
|
75
76
|
"WebkitTextStrokeWidth",
|
|
76
77
|
"WebkitTextStrokeColor"
|
|
77
78
|
];
|
|
@@ -3484,10 +3485,8 @@ async function buildNode(element, parentStyle, yogaNode, viewportWidth, viewport
|
|
|
3484
3485
|
const naturalH = image.height;
|
|
3485
3486
|
const wSet = style.width !== void 0;
|
|
3486
3487
|
const hSet = style.height !== void 0;
|
|
3487
|
-
if (
|
|
3488
|
-
|
|
3489
|
-
} else if (hSet && !wSet && typeof style.height === "number" && naturalH > 0) {
|
|
3490
|
-
style.width = style.height * (naturalW / naturalH);
|
|
3488
|
+
if (naturalW > 0 && naturalH > 0 && !(wSet && hSet)) {
|
|
3489
|
+
yogaNode.setAspectRatio(naturalW / naturalH);
|
|
3491
3490
|
}
|
|
3492
3491
|
} catch {
|
|
3493
3492
|
}
|