circuit-to-svg 0.0.107 → 0.0.108

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
@@ -307,6 +307,8 @@ function createSvgObjectsFromPcbSilkscreenPath(silkscreenPath, transform) {
307
307
  attributes: {
308
308
  class: `pcb-silkscreen pcb-silkscreen-${silkscreenPath.layer}`,
309
309
  d: path,
310
+ fill: "none",
311
+ stroke: "#f2eda1",
310
312
  "stroke-width": (silkscreenPath.stroke_width * Math.abs(transform.a)).toString(),
311
313
  "data-pcb-component-id": silkscreenPath.pcb_component_id,
312
314
  "data-pcb-silkscreen-path-id": silkscreenPath.pcb_silkscreen_path_id
@@ -353,6 +355,7 @@ function createSvgObjectsFromPcbSilkscreenText(pcbSilkscreenText, transform) {
353
355
  attributes: {
354
356
  x: "0",
355
357
  y: "0",
358
+ fill: "#f2eda1",
356
359
  "font-family": "Arial, sans-serif",
357
360
  "font-size": transformedFontSize.toString(),
358
361
  "text-anchor": "middle",
@@ -406,7 +409,8 @@ function createSvgObjectsFromPcbSilkscreenRect(pcbSilkscreenRect, transform) {
406
409
  width: transformedWidth.toString(),
407
410
  height: transformedHeight.toString(),
408
411
  class: `pcb-silkscreen-rect pcb-silkscreen-${layer}`,
409
- stroke: "red",
412
+ fill: "none",
413
+ stroke: "#f2eda1",
410
414
  "stroke-width": "1",
411
415
  "data-pcb-silkscreen-rect-id": pcb_silkscreen_rect_id
412
416
  },
@@ -436,9 +440,6 @@ function createSvgObjectsFromPcbSilkscreenCircle(pcbSilkscreenCircle, transform)
436
440
  center.y
437
441
  ]);
438
442
  const transformedRadius = radius * Math.abs(transform.a);
439
- console.debug(
440
- `Transformed Circle - X: ${transformedX}, Y: ${transformedY}, Radius: ${transformedRadius}`
441
- );
442
443
  const svgObject = {
443
444
  name: "circle",
444
445
  type: "element",
@@ -447,14 +448,13 @@ function createSvgObjectsFromPcbSilkscreenCircle(pcbSilkscreenCircle, transform)
447
448
  cy: transformedY.toString(),
448
449
  r: transformedRadius.toString(),
449
450
  class: `pcb-silkscreen-circle pcb-silkscreen-${layer}`,
450
- stroke: "red",
451
- "stroke-width": "3",
451
+ stroke: "#f2eda1",
452
+ "stroke-width": "1",
452
453
  "data-pcb-silkscreen-circle-id": pcb_silkscreen_circle_id
453
454
  },
454
455
  value: "",
455
456
  children: []
456
457
  };
457
- console.log(svgObject);
458
458
  return [svgObject];
459
459
  }
460
460
 
@@ -488,6 +488,7 @@ function createSvgObjectsFromPcbSilkscreenLine(pcbSilkscreenLine, transform) {
488
488
  y1: transformedY1.toString(),
489
489
  x2: transformedX2.toString(),
490
490
  y2: transformedY2.toString(),
491
+ stroke: "#f2eda1",
491
492
  "stroke-width": transformedStrokeWidth.toString(),
492
493
  class: `pcb-silkscreen-line pcb-silkscreen-${layer}`,
493
494
  "data-pcb-silkscreen-line-id": pcb_silkscreen_line_id
@@ -980,10 +981,6 @@ function convertCircuitJsonToPcbSvg(soup, options) {
980
981
  .pcb-hole-inner { fill: rgb(255, 38, 226); }
981
982
  .pcb-pad { }
982
983
  .pcb-boundary { fill: none; stroke: #fff; stroke-width: 0.3; }
983
- .pcb-silkscreen { fill: none; }
984
- .pcb-silkscreen-top { stroke: #f2eda1; }
985
- .pcb-silkscreen-bottom { stroke: #f2eda1; }
986
- .pcb-silkscreen-text { fill: #f2eda1; }
987
984
  `
988
985
  }
989
986
  ]