Yanzhen Yu
2020-11-29 14:37:11 +08:00
parent 924d2d9911
commit 6c2d85049a
2 changed files with 6 additions and 3 deletions

View File

@@ -309,8 +309,11 @@ function serializeNode(
}
if (needBlock) {
const { width, height } = (n as HTMLElement).getBoundingClientRect();
attributes.rr_width = `${width}px`;
attributes.rr_height = `${height}px`;
attributes = {
class: attributes.class,
rr_width: `${width}px`,
rr_height: `${height}px`,
};
}
return {
type: NodeType.Element,