3 Commits

Author SHA1 Message Date
caeec2ab79 Make PES Link clickable
Some checks failed
API CI / api-tests (pull_request) Failing after 17s
CI / test (pull_request) Failing after 37s
2026-07-02 21:25:57 +02:00
3525621281 adjusted migration
Initial bayer app

Show Pack Classification

Adjusted docker compose to bayer specifics

Adjusted Dockerfile for Bayer

Adding secret flags to group, add secret pools to packages

Adjusted View for Package creation

Prep configs, added Package Create Modal

wip

More on PES

wip

wip

Wip

minor

PW interactions

API PES

wip

Make Select Widget reflect required

make required generallay available

Update UI if pathway mode is set to build

Added ais

circle adjustments

Initial Zoom, fix AD Creation

wip

auth log, bb4g fix

missing import

Added viz hint if PES is part of reaction

Add Edge check for pes

flip boolean

...

pes

Added extra

...

In / Out Edges Viz, Submitting Button Text

...
2026-07-02 21:25:57 +02:00
9bc9f86ff1 [Fix] Pathway SVG Export has Edges again, Fix In/Out Edge coloring (#422)
Co-authored-by: Tim Lorsbach <tim@lorsba.ch>
Reviewed-on: enviPath/enviPy#422
2026-07-03 07:24:02 +12:00

View File

@ -1,13 +1,19 @@
console.log("loaded pw.js") console.log("loaded pw.js")
function findPaths(source_idx, target_idx, links) { function findPaths(source_idx, links) {
const resultLinks = new Set(); const resultLinks = new Set();
const visited = new Set(); const visited = new Set();
// Helper function for depth-first search // Helper function for depth-first search
function dfs(current) { function dfs(current) {
if (current === target_idx) {
if (visited.has(current)) {
return; return;
} }
if (links.filter(link => link.target.id === current).length === 0) {
return;
}
visited.add(current); visited.add(current);
links.forEach(link => { links.forEach(link => {
if ( if (
@ -23,7 +29,7 @@ function findPaths(source_idx, target_idx, links) {
} }
// Start DFS // Start DFS
dfs(source_idx); dfs(source_idx);
return Array.from(resultLinks); // Convert Set to Array for result return Array.from(resultLinks);
} }
function predictFromNode(url) { function predictFromNode(url) {
@ -707,7 +713,7 @@ function draw(pathway, elem) {
if (!wasHighlighted) { if (!wasHighlighted) {
d3.select(this).select("circle").classed("highlighted", !d3.select(this).select("circle").classed("highlighted")); d3.select(this).select("circle").classed("highlighted", !d3.select(this).select("circle").classed("highlighted"));
const inEdges = findPaths(d.id, 3, links); const inEdges = findPaths(d.id, links);
const outEdges = [] const outEdges = []
// Colorize out edges green // Colorize out edges green
for (const l of links) { for (const l of links) {
@ -805,14 +811,14 @@ function draw(pathway, elem) {
function serializeSVG(svgElement) { function serializeSVG(svgElement) {
svgElement.querySelectorAll("line.link").forEach(line => { svgElement.querySelectorAll("path.link").forEach(line => {
const style = getComputedStyle(line); const style = getComputedStyle(line);
line.setAttribute("stroke", style.stroke); line.setAttribute("stroke", style.stroke);
line.setAttribute("stroke-width", style.strokeWidth); line.setAttribute("stroke-width", style.strokeWidth);
line.setAttribute("fill", style.fill); line.setAttribute("fill", style.fill);
}); });
svgElement.querySelectorAll("line.link_no_arrow").forEach(line => { svgElement.querySelectorAll("path.link_no_arrow").forEach(line => {
const style = getComputedStyle(line); const style = getComputedStyle(line);
line.setAttribute("stroke", style.stroke); line.setAttribute("stroke", style.stroke);
line.setAttribute("stroke-width", style.strokeWidth); line.setAttribute("stroke-width", style.strokeWidth);