Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 uid=33(www-data) gid=33(www-data) groups=33(www-data) Safe-mode: OFF (not secure) /var/www/html/queuepro/node_modules/svg.js/src/ drwxrwxr-x | |
| Viewing file: Select action/file-type: SVG.Parent = SVG.invent({
// Initialize node
create: function(element) {
this.constructor.call(this, element)
}
// Inherit from
, inherit: SVG.Element
// Add class methods
, extend: {
// Returns all child elements
children: function() {
return SVG.utils.map(SVG.utils.filterSVGElements(this.node.childNodes), function(node) {
return SVG.adopt(node)
})
}
// Add given element at a position
, add: function(element, i) {
if (i == null)
this.node.appendChild(element.node)
else if (element.node != this.node.childNodes[i])
this.node.insertBefore(element.node, this.node.childNodes[i])
return this
}
// Basically does the same as `add()` but returns the added element instead
, put: function(element, i) {
this.add(element, i)
return element
}
// Checks if the given element is a child
, has: function(element) {
return this.index(element) >= 0
}
// Gets index of given element
, index: function(element) {
return [].slice.call(this.node.childNodes).indexOf(element.node)
}
// Get a element at the given index
, get: function(i) {
return SVG.adopt(this.node.childNodes[i])
}
// Get first child
, first: function() {
return this.get(0)
}
// Get the last child
, last: function() {
return this.get(this.node.childNodes.length - 1)
}
// Iterates over all children and invokes a given block
, each: function(block, deep) {
var i, il
, children = this.children()
for (i = 0, il = children.length; i < il; i++) {
if (children[i] instanceof SVG.Element)
block.apply(children[i], [i, children])
if (deep && (children[i] instanceof SVG.Container))
children[i].each(block, deep)
}
return this
}
// Remove a given child
, removeElement: function(element) {
this.node.removeChild(element.node)
return this
}
// Remove all elements in this container
, clear: function() {
// remove children
while(this.node.hasChildNodes())
this.node.removeChild(this.node.lastChild)
// remove defs reference
delete this._defs
return this
}
, // Get defs
defs: function() {
return this.doc().defs()
}
}
})
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0044 ]-- |