#1295 for Multi line labels separated with \n

This commit is contained in:
Knut Sveidqvist
2020-04-25 14:12:04 +02:00
parent 25ea221a6a
commit a1a7d44fd7

View File

@@ -3,7 +3,7 @@ const createLabel = (vertexText, style) => {
svgLabel.setAttribute('style', style.replace('color:', 'fill:'));
let rows = [];
if (vertexText) {
rows = vertexText.split(/\n|<br\s*\/?>/gi);
rows = vertexText.split(/\\n|\n|<br\s*\/?>/gi);
}
for (let j = 0; j < rows.length; j++) {