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/core/ drwxrwxr-x | |
| Viewing file: Select action/file-type: export default function setFocus(config = {}) {
let bbox, codes = []
if (config.region) {
codes.push(config.region)
} else if (config.regions) {
codes = config.regions
}
if (codes.length) {
codes.forEach((code) => {
if (this.regions[code]) {
let itemBbox = this.regions[code].element.shape.getBBox()
if (itemBbox) {
// Handle the first loop
if (typeof bbox == 'undefined') {
bbox = itemBbox
} else {
// get the old bbox properties plus the current
// this kinda incrementing the old values and the new values
bbox = {
x: Math.min(bbox.x, itemBbox.x),
y: Math.min(bbox.y, itemBbox.y),
width: Math.max(bbox.x + bbox.width, itemBbox.x + itemBbox.width) - Math.min(bbox.x, itemBbox.x),
height: Math.max(bbox.y + bbox.height, itemBbox.y + itemBbox.height) - Math.min(bbox.y, itemBbox.y),
}
}
}
}
})
return this.setScale(
Math.min(this.width / bbox.width, this.height / bbox.height),
-(bbox.x + bbox.width / 2),
-(bbox.y + bbox.height / 2),
true,
config.animate,
)
} else if (config.coords) {
const point = this.coordsToPoint(config.coords[0], config.coords[1])
const x = this.transX - point.x / this.scale
const y = this.transY - point.y / this.scale
return this.setScale(config.scale * this.baseScale, x, y, true, config.animate)
}
}
|
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0045 ]-- |