diff --git a/backend/server.py b/backend/server.py index bcde967..0e6409b 100644 --- a/backend/server.py +++ b/backend/server.py @@ -468,18 +468,23 @@ def list_technologies(): """List technology choices from the active role-scoped PDK root.""" technologies = [] pdks_root = current_pdk_root() + print(f"[TECH] pdks_root={pdks_root} exists={os.path.isdir(pdks_root)}") # Technology choices are built from foundry/technology directories under the # role PDK root, and only folders with technology.yml are exposed. if os.path.isdir(pdks_root): for foundry in sorted(os.listdir(pdks_root)): foundry_path = os.path.join(pdks_root, foundry) if not os.path.isdir(foundry_path): + print(f"[TECH] skip non-dir foundry={foundry}") continue for technology in sorted(os.listdir(foundry_path)): technology_path = os.path.join(foundry_path, technology) if not os.path.isdir(technology_path): + print(f"[TECH] skip non-dir tech={technology}") continue - if not os.path.exists(os.path.join(technology_path, "technology.yml")): + has_manifest = os.path.exists(os.path.join(technology_path, "technology.yml")) + print(f"[TECH] foundry={foundry} tech={technology} has_manifest={has_manifest}") + if not has_manifest: continue technologies.append({ "foundry": foundry, @@ -487,6 +492,7 @@ def list_technologies(): "id": f"{foundry}/{technology}", "label": f"{foundry} / {technology}" }) + print(f"[TECH] returning {len(technologies)} technologies: {[t['id'] for t in technologies]}") return jsonify({"technologies": technologies}) diff --git a/frontend/canvas-helpers.js b/frontend/canvas-helpers.js index 31d35ed..b10c6c1 100644 --- a/frontend/canvas-helpers.js +++ b/frontend/canvas-helpers.js @@ -28,13 +28,13 @@ // Default editable canvas dimensions in micrometers. const DEFAULT_CANVAS_SIZE = { width: 5000, height: 5000 }; // Base visual diameter and hit area used for port and anchor handles. - const PORT_NODE_SIZE = 30; + const PORT_NODE_SIZE = 11; const FREE_WIRES_BUNDLE_GROUP = 'free_wires'; const PORT_LABEL_MIN_CHARS = 5; const PORT_LABEL_CHAR_WIDTH = 7; const PORT_LABEL_HORIZONTAL_PADDING = 12; // Anchor body width used in the canvas visual representation. - const ANCHOR_NODE_WIDTH = 16; + const ANCHOR_NODE_WIDTH = 18; // Default spacing between repeated anchor or port pins. const DEFAULT_ELEMENT_PITCH = 10; // Defines built-in port and anchor element metadata before per-node expansion. @@ -810,7 +810,7 @@ return { width: data && data.elementType === 'anchor' ? ANCHOR_NODE_WIDTH : PORT_NODE_SIZE, height: data && data.elementType === 'anchor' - ? Math.max(PORT_NODE_SIZE / 2, PORT_NODE_SIZE / 2 + Math.max(0, portNumber - 1) * handleClearance) + ? Math.max(PORT_NODE_SIZE * 1.125, PORT_NODE_SIZE * 1.125 + Math.max(0, portNumber - 1) * handleClearance) : Math.max(PORT_NODE_SIZE, PORT_NODE_SIZE + Math.max(0, portNumber - 1) * handleClearance) }; }; diff --git a/frontend/canvas.html b/frontend/canvas.html index 5e8c4b3..60bc66b 100644 --- a/frontend/canvas.html +++ b/frontend/canvas.html @@ -17,12 +17,24 @@ Organization : OptiHK Limited - - - - - - + + + + + + + + + + + + + + + + + +