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/elements/ drwxrwxr-x | |
| Viewing file: Select action/file-type:
/**
* ------------------------------------------------------------------------
* Class Definition ( Abstract )
* ------------------------------------------------------------------------
*/
class baseElement {
getLabelText(key, label) {
if (!label) {
return
}
if (typeof label.render === 'function') {
let params = []
// Pass additional paramater (Marker config object) in case it's a Marker.
if (this.config && this.config.marker) {
params.push(this.config.marker)
}
// Becuase we need to add the key always at the end
params.push(key)
return label.render.apply(this, params)
}
return key
}
getLabelOffsets(key, label) {
if (typeof label.offsets === 'function') {
return label.offsets(key)
}
// If offsets are an array of offsets e.g offsets: [ [0, 25], [10, 15] ]
if (Array.isArray(label.offsets)) {
return label.offsets[key]
}
return [0, 0]
}
setStyle(property, value) {
this.shape.setStyle(property, value)
}
remove() {
this.shape.remove()
if (this.label) this.label.remove()
}
hover(state) {
this._setStatus('isHovered', state)
}
select(state) {
this._setStatus('isSelected', state)
}
// Private
_setStatus(property, state) {
this.shape[property] = state
this.shape.updateStyle()
this[property] = state
if (this.label) {
this.label[property] = state
this.label.updateStyle()
}
}
}
export default baseElement |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0046 ]-- |