mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2024-12-29 09:22:22 -05:00
Comment
This commit is contained in:
parent
d64edfcf8a
commit
134070dea3
1 changed files with 3 additions and 0 deletions
|
@ -318,6 +318,9 @@ new function() {
|
|||
var spacing = 1.2;
|
||||
for (var i = 0; i < node.childNodes.length; i++) {
|
||||
var child = node.childNodes[i];
|
||||
// node.childNodes includes plaintext as well as elements.
|
||||
// By checking for getAttribute, we ignore plaintext
|
||||
// (node.children gets only elements but is not supported on Safari)
|
||||
if (!child.getAttribute) continue;
|
||||
lines.push(child.textContent);
|
||||
var dyString = child.getAttribute('dy');
|
||||
|
|
Loading…
Reference in a new issue