easyeda 0.0.348 → 0.0.350

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.
@@ -12477,6 +12477,17 @@ var generateShapeTsx = ({
12477
12477
  }) => {
12478
12478
  const transformPoint = getPointTransformer(origin);
12479
12479
  if (shape.type === "RECTANGLE") {
12480
+ if (shape.fillColor && shape.fillColor !== "none" && shape.fillColor.toLowerCase() !== shape.color.toLowerCase()) {
12481
+ const { x, y } = shape.position;
12482
+ const points = [
12483
+ { x, y },
12484
+ { x: x + shape.width, y },
12485
+ { x: x + shape.width, y: y + shape.height },
12486
+ { x, y: y + shape.height },
12487
+ { x, y }
12488
+ ].map(transformPoint);
12489
+ return `<schematicpath points={${JSON.stringify(points)}} strokeWidth={${toSchematicUnits(shape.lineWidth)}} strokeColor=${JSON.stringify(shape.color)} isFilled fillColor=${JSON.stringify(shape.fillColor)} />`;
12490
+ }
12480
12491
  const center = transformPoint({
12481
12492
  x: shape.position.x + shape.width / 2,
12482
12493
  y: shape.position.y + shape.height / 2