Restore textAlign property (#1374)

This commit is contained in:
fujimoto kyosuke 2020-04-11 17:59:22 +09:00 committed by GitHub
parent f7e3ee2064
commit b971737d32
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,8 +57,10 @@ export function restore(
element.points = points;
} else {
if (isTextElement(element)) {
if (!element.textAlign) {
element.textAlign = DEFAULT_TEXT_ALIGN;
}
}
normalizeDimensions(element);
// old spec, where non-linear elements used to have empty points arrays