circuit-to-svg 0.0.287 → 0.0.289

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
@@ -5376,7 +5376,7 @@ function createSvgObjectsFromPcbComponent(component, ctx) {
5376
5376
  const scaledHeight = height * Math.abs(transform.d);
5377
5377
  const transformStr = `translate(${x}, ${y}) rotate(${-rotation}) scale(1, -1)`;
5378
5378
  const svgObjects = [];
5379
- if (ctx.showAnchorOffsets && component.position_mode === "relative" && circuitJson) {
5379
+ if (ctx.showAnchorOffsets && circuitJson && component.position_mode === "relative_to_group_anchor" && (component.positioned_relative_to_pcb_group_id || component.positioned_relative_to_pcb_board_id)) {
5380
5380
  const anchorPosition = getAnchorPosition(component, circuitJson);
5381
5381
  if (anchorPosition) {
5382
5382
  svgObjects.push(
@@ -5386,8 +5386,8 @@ function createSvgObjectsFromPcbComponent(component, ctx) {
5386
5386
  transform,
5387
5387
  componentWidth: width,
5388
5388
  componentHeight: height,
5389
- displayXOffset: component.display_x_offset,
5390
- displayYOffset: component.display_y_offset
5389
+ displayXOffset: component.display_offset_x,
5390
+ displayYOffset: component.display_offset_y
5391
5391
  })
5392
5392
  );
5393
5393
  }
@@ -5530,7 +5530,7 @@ function getSoftwareUsedString(circuitJson) {
5530
5530
  var package_default = {
5531
5531
  name: "circuit-to-svg",
5532
5532
  type: "module",
5533
- version: "0.0.286",
5533
+ version: "0.0.288",
5534
5534
  description: "Convert Circuit JSON to SVG",
5535
5535
  main: "dist/index.js",
5536
5536
  files: [
@@ -5553,7 +5553,7 @@ var package_default = {
5553
5553
  "@vitejs/plugin-react": "5.0.0",
5554
5554
  biome: "^0.3.3",
5555
5555
  "bun-match-svg": "^0.0.12",
5556
- "circuit-json": "^0.0.331",
5556
+ "circuit-json": "^0.0.332",
5557
5557
  esbuild: "^0.20.2",
5558
5558
  "performance-now": "^2.1.0",
5559
5559
  react: "19.1.0",