@lvce-editor/renderer-process 30.68.14 → 30.68.15
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.
|
@@ -3389,6 +3389,14 @@ const setDimension = ($Element, key, value) => {
|
|
|
3389
3389
|
$Element[key] = value;
|
|
3390
3390
|
return;
|
|
3391
3391
|
}
|
|
3392
|
+
if ($Element instanceof HTMLCanvasElement) {
|
|
3393
|
+
const attributeValue = String(value);
|
|
3394
|
+
if ($Element.getAttribute(key) !== attributeValue) {
|
|
3395
|
+
// IDL dimension setters throw after transferControlToOffscreen().
|
|
3396
|
+
// Attributes still reflect dimensions without selecting a context.
|
|
3397
|
+
$Element.setAttribute(key, attributeValue);
|
|
3398
|
+
}
|
|
3399
|
+
}
|
|
3392
3400
|
$Element.style[key] = typeof value === 'number' ? `${value}px` : value;
|
|
3393
3401
|
};
|
|
3394
3402
|
const setPixelStyle = ($Element, key, value) => {
|