fix new lines

This commit is contained in:
pythongosssss
2023-09-10 19:22:57 +01:00
parent d4b8dd35d5
commit 08ca753d09
+7 -1
View File
@@ -561,7 +561,13 @@ app.registerExtension({
ctx.fillStyle = style.getPropertyValue("color");
ctx.font = style.getPropertyValue("font");
wrapText(ctx, this.inputEl.value, x, y + t.d * 12, w, t.d * 12);
const line = t.d * 12;
const split = this.inputEl.value.split("\n");
let start = y;
for (const l of split) {
start += line;
wrapText(ctx, l, x + 4, start, w, line);
}
ctx.restore();
}