Skip to content

A modern platform for visual, flexible, and extensible graph-based investigations. For cybersecurity analysts and investigators.

fix(graph): wrap clip in save/restore to prevent canvas state leak

dextmorgnf06989447efd
diff --git a/flowsint-app/src/components/sketches/graph/node/node-renderer.ts b/flowsint-app/src/components/sketches/graph/node/node-renderer.ts
index 62a877c4..b9d871de 100644
--- a/flowsint-app/src/components/sketches/graph/node/node-renderer.ts
+++ b/flowsint-app/src/components/sketches/graph/node/node-renderer.ts
@@ -103,9 +103,11 @@ const drawClippedImage = (
drawHeight = diameter / imgAspect
}
+ ctx.save()
drawNodePath(ctx, x, y, size, shape)
ctx.clip()
ctx.drawImage(img, x - drawWidth / 2, y - drawHeight / 2, drawWidth, drawHeight)
+ ctx.restore()
}
// --- Node visual resolution ---