[Fix] Collection of minor Bugfixes (#417)

User feedback from on-prem installation

Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#417
This commit is contained in:
2026-06-17 07:56:32 +12:00
parent 6ab9180291
commit 2502c020f7
18 changed files with 138 additions and 82 deletions

View File

@ -59,6 +59,9 @@ document.addEventListener("alpine:init", () => {
get isEditMode() {
return this.mode === "edit";
},
get isRequired() {
return (this.schema.required || []).indexOf(this.fieldName) > -1
}
});
// Text widget

View File

@ -23,6 +23,7 @@ function predictFromNode(url) {
// elem = 'vizdiv'
function draw(pathway, elem) {
const initialzoom = 2.5
const nodeRadius = 20;
const linkDistance = 100;
const chargeStrength = -200;
@ -63,7 +64,7 @@ function draw(pathway, elem) {
node.fx = width / 2 + depthMap.get(node.depth) * horizontalSpacing - ((nodesInLevel - 1) * horizontalSpacing) / 2;
}
node.fy = node.depth * levelSpacing + 50;
node.fy = (node.depth + initialzoom + 0.5) * levelSpacing + 50;
depthMap.set(node.depth, depthMap.get(node.depth) + 1);
});
}
@ -577,6 +578,8 @@ function draw(pathway, elem) {
// Apply zoom to the SVG element - this enables wheel zoom
svg.call(zoom);
svg.call(zoom.scaleBy, initialzoom);
// Also apply zoom to container to catch events that might not reach SVG
// This ensures drag-to-pan works even when clicking on empty space
container.call(zoom);