mirror of
https://github.com/zsviczian/obsidian-excalidraw-plugin.git
synced 2025-08-06 05:46:28 +00:00
updated text arch and split text by lines
This commit is contained in:
@@ -20,8 +20,8 @@ elements.forEach((el)=>{
|
||||
ea.style.fontSize = el.fontSize;
|
||||
const text = el.rawText.split("\n");
|
||||
for(i=0;i<text.length;i++) {
|
||||
ea.addText(el.x,el.y+i*el.height/text.length,text[i]);
|
||||
ea.addText(el.x,el.y+i*el.height/text.length,text[i].trim());
|
||||
}
|
||||
});
|
||||
ea.addElementsToView(false,false);
|
||||
ea.addElementsToView(false,false,true);
|
||||
ea.deleteViewElements(elements);
|
||||
@@ -46,4 +46,4 @@ for(i=0;i<el.text.length;i++) {
|
||||
objectIDs.push(ea.addText(x,y,character));
|
||||
}
|
||||
ea.addToGroup(objectIDs);
|
||||
ea.addElementsToView(true);
|
||||
ea.addElementsToView(true, false, true);
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user