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/jsvectormap/src/js/svg/ drwxrwxr-x | |
| Viewing file: Select action/file-type: import {
hyphenate,
removeElement
} from "../util/index"
/**
* ------------------------------------------------------------------------
* Class Definition
* ------------------------------------------------------------------------
*/
class SVGElement {
constructor(name, config) {
this.node = this.createElement(name)
if (config) {
this.set(config)
}
}
// Create new SVG element `svg`, `g`, `path`, `line`, `circle`, `image`, etc.
// https://developer.mozilla.org/en-US/docs/Web/API/Document/createElementNS#important_namespace_uris
createElement(tagName) {
return document.createElementNS('http://www.w3.org/2000/svg', tagName)
}
addClass(className) {
this.node.setAttribute('class', className)
}
getBBox() {
return this.node.getBBox()
}
// Apply attributes on the current node element
set(property, value) {
if (typeof property === 'object') {
for (let attr in property) {
this.applyAttr(attr, property[attr])
}
} else {
this.applyAttr(property, value)
}
}
get(property) {
return this.style.initial[property]
}
applyAttr(property, value) {
this.node.setAttribute(hyphenate(property), value)
}
remove() {
removeElement(this.node)
}
}
export default SVGElement |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0045 ]-- |