@tscircuit/pcb-viewer 1.11.380 → 1.11.381

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -9763,6 +9763,7 @@ var showTraceSegmentsInsideHiddenCopperPours = (trace) => ({
9763
9763
  };
9764
9764
  })
9765
9765
  });
9766
+ var getTraceClipContextElements = (elements, showCopperPours) => showCopperPours ? elements : [];
9766
9767
  function drawPcbTraceElementsForLayer({
9767
9768
  canvas,
9768
9769
  elements,
@@ -9793,16 +9794,26 @@ function drawPcbTraceElementsForLayer({
9793
9794
  nonHighlightedElements.push(element);
9794
9795
  }
9795
9796
  }
9797
+ const clipContextElements = getTraceClipContextElements(
9798
+ elements,
9799
+ showCopperPours
9800
+ );
9796
9801
  if (nonHighlightedElements.length > 0) {
9797
9802
  const drawer = new CircuitToCanvasDrawer11(canvas);
9798
9803
  drawer.realToCanvasMat = realToCanvasMat;
9799
- drawer.drawElements(nonHighlightedElements, { layers });
9804
+ drawer.drawElements(nonHighlightedElements, {
9805
+ layers,
9806
+ clipContextElements
9807
+ });
9800
9808
  }
9801
9809
  if (highlightedElements.length > 0) {
9802
9810
  const highlightDrawer = new CircuitToCanvasDrawer11(canvas);
9803
9811
  highlightDrawer.configure({ colorOverrides: HOVER_COLOR_MAP2 });
9804
9812
  highlightDrawer.realToCanvasMat = realToCanvasMat;
9805
- highlightDrawer.drawElements(highlightedElements, { layers });
9813
+ highlightDrawer.drawElements(highlightedElements, {
9814
+ layers,
9815
+ clipContextElements
9816
+ });
9806
9817
  }
9807
9818
  }
9808
9819
 
@@ -14968,7 +14979,7 @@ import { css as css3 } from "@emotion/css";
14968
14979
  // package.json
14969
14980
  var package_default = {
14970
14981
  name: "@tscircuit/pcb-viewer",
14971
- version: "1.11.379",
14982
+ version: "1.11.380",
14972
14983
  main: "dist/index.js",
14973
14984
  type: "module",
14974
14985
  repository: "tscircuit/pcb-viewer",
@@ -15023,7 +15034,7 @@ var package_default = {
15023
15034
  "@tscircuit/math-utils": "^0.0.36",
15024
15035
  "@vitejs/plugin-react": "^5.0.2",
15025
15036
  "circuit-json": "^0.0.450",
15026
- "circuit-to-canvas": "^0.0.115",
15037
+ "circuit-to-canvas": "^0.0.118",
15027
15038
  color: "^4.2.3",
15028
15039
  "react-supergrid": "^1.0.10",
15029
15040
  "react-toastify": "^10.0.5",