| 1363 | |
| 1364 | } |
| 1365 | class LineNode { |
| 1366 | constructor(attributes) { |
| 1367 | this.attributes = void 0; |
| 1368 | this.attributes = attributes || {}; |
| 1369 | } |
| 1370 | |
| 1371 | toNode() { |
| 1372 | const svgNS = "http://www.w3.org/2000/svg"; |
| 1373 | const node = document.createElementNS(svgNS, "line"); // Apply attributes |
| 1374 | |
| 1375 | for (const attr in this.attributes) { |
| 1376 | if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) { |
| 1377 | node.setAttribute(attr, this.attributes[attr]); |
| 1378 | } |
| 1379 | } |
| 1380 | |
| 1381 | return node; |
| 1382 | } |
| 1383 | |
| 1384 | toMarkup() { |
| 1385 | let markup = "<line"; |
| 1386 | |
| 1387 | for (const attr in this.attributes) { |
| 1388 | if (Object.prototype.hasOwnProperty.call(this.attributes, attr)) { |
| 1389 | markup += ` ${attr}='${this.attributes[attr]}'`; |
| 1390 | } |
| 1391 | } |
| 1392 | |
| 1393 | markup += "/>"; |
| 1394 | return markup; |
| 1395 | } |
| 1396 | |
| 1397 | } |
| 1398 | function assertSymbolDomNode(group) { |
| 1399 | if (group instanceof SymbolNode) { |
| 1400 | return group; |
nothing calls this directly
no outgoing calls
no test coverage detected