easyeda 0.0.349 → 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.
package/dist/index.js CHANGED
@@ -8798,6 +8798,17 @@ var generateShapeTsx = ({
8798
8798
  }) => {
8799
8799
  const transformPoint = getPointTransformer(origin);
8800
8800
  if (shape.type === "RECTANGLE") {
8801
+ if (shape.fillColor && shape.fillColor !== "none" && shape.fillColor.toLowerCase() !== shape.color.toLowerCase()) {
8802
+ const { x, y } = shape.position;
8803
+ const points = [
8804
+ { x, y },
8805
+ { x: x + shape.width, y },
8806
+ { x: x + shape.width, y: y + shape.height },
8807
+ { x, y: y + shape.height },
8808
+ { x, y }
8809
+ ].map(transformPoint);
8810
+ return `<schematicpath points={${JSON.stringify(points)}} strokeWidth={${toSchematicUnits(shape.lineWidth)}} strokeColor=${JSON.stringify(shape.color)} isFilled fillColor=${JSON.stringify(shape.fillColor)} />`;
8811
+ }
8801
8812
  const center = transformPoint({
8802
8813
  x: shape.position.x + shape.width / 2,
8803
8814
  y: shape.position.y + shape.height / 2