MCPcopy
hub / github.com/adobe-webplatform/Snap.svg / add2group

Function add2group

src/svg.js:1298–1320  ·  view source on GitHub ↗
(list)

Source from the content-addressed store, hash-verified

1296};
1297
1298function add2group(list) {
1299 if (!is(list, "array")) {
1300 list = Array.prototype.slice.call(arguments, 0);
1301 }
1302 var i = 0,
1303 j = 0,
1304 node = this.node;
1305 while (this[i]) delete this[i++];
1306 for (i = 0; i < list.length; i++) {
1307 if (list[i].type == "set") {
1308 list[i].forEach(function (el) {
1309 node.appendChild(el.node);
1310 });
1311 } else {
1312 node.appendChild(list[i].node);
1313 }
1314 }
1315 var children = node.childNodes;
1316 for (i = 0; i < children.length; i++) {
1317 this[j++] = wrap(children[i]);
1318 }
1319 return this;
1320}
1321// Hub garbage collector every 10s
1322setInterval(function () {
1323 for (var key in hub) if (hub[has](key)) {

Callers

nothing calls this directly

Calls 2

isFunction · 0.70
wrapFunction · 0.70

Tested by

no test coverage detected