Solve without using node.children

This commit is contained in:
DD Liu 2019-07-25 16:57:47 -04:00
parent 9b353ba41d
commit d64edfcf8a

View file

@ -316,8 +316,9 @@ new function() {
// Does not support x/y attribute or tspan positioning beyond left justified. // Does not support x/y attribute or tspan positioning beyond left justified.
var lines = []; var lines = [];
var spacing = 1.2; var spacing = 1.2;
for (var i = 0; i < node.children.length; i++) { for (var i = 0; i < node.childNodes.length; i++) {
var child = node.children[i]; var child = node.childNodes[i];
if (!child.getAttribute) continue;
lines.push(child.textContent); lines.push(child.textContent);
var dyString = child.getAttribute('dy'); var dyString = child.getAttribute('dy');
if (dyString) { if (dyString) {