Auto commit: 2026-03-13T16:18:43.826Z

This commit is contained in:
Flatlogic Bot 2026-03-13 16:18:43 +00:00
parent ef8a8d4c27
commit bc8c102df7
2 changed files with 36 additions and 1 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

View File

@ -239,7 +239,42 @@
const network = new vis.Network(container, data, options);
function fitNetwork() {
// Change Layout function
function changeLayout(value) {
if (value === 'hierarchical') {
network.setOptions({
layout: {
improvedLayout: true,
hierarchical: {
direction: 'UD',
sortMethod: 'directed'
}
}
});
} else {
network.setOptions({
layout: {
improvedLayout: true,
hierarchical: false
}
});
}
}
// Zoom In function
function zoomIn() {
var scale = network.getScale();
network.moveTo({ scale: scale * 1.5 });
}
// Zoom Out function
function zoomOut() {
var scale = network.getScale();
network.moveTo({ scale: scale / 1.5 });
}
function fitNetwork() {
network.fit({ animation: { duration: 1000, easingFunction: 'easeInOutQuad' } });
}