(data)
| 249 | }); |
| 250 | } |
| 251 | function attributeElement(data) { |
| 252 | var index = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0; |
| 253 | var element = d3__namespace.select(this); |
| 254 | data.tag; |
| 255 | var attributes = data.attributes; |
| 256 | var currentAttributes = element.node().attributes; |
| 257 | if (currentAttributes) { |
| 258 | for (var i = 0; i < currentAttributes.length; i++) { |
| 259 | var currentAttribute = currentAttributes[i]; |
| 260 | var name = currentAttribute.name; |
| 261 | if (name.split(':')[0] != 'xmlns' && currentAttribute.namespaceURI) { |
| 262 | var namespaceURIParts = currentAttribute.namespaceURI.split('/'); |
| 263 | var namespace = namespaceURIParts[namespaceURIParts.length - 1]; |
| 264 | name = namespace + ':' + name; |
| 265 | } |
| 266 | if (!(name in attributes)) { |
| 267 | attributes[name] = null; |
| 268 | } |
| 269 | } |
| 270 | } |
| 271 | for (var _i2 = 0, _Object$keys2 = Object.keys(attributes); _i2 < _Object$keys2.length; _i2++) { |
| 272 | var attributeName = _Object$keys2[_i2]; |
| 273 | element.attr(attributeName, attributes[attributeName]); |
| 274 | } |
| 275 | if (data.text) { |
| 276 | element.text(data.text); |
| 277 | } |
| 278 | insertChildren(element, index); |
| 279 | } |
| 280 | |
| 281 | function zoom (enable) { |
| 282 | this._options.zoom = enable; |
nothing calls this directly
no test coverage detected