easyeda 0.0.279 → 0.0.280

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
@@ -8178,27 +8178,27 @@ var generateShapeTsx = ({
8178
8178
  x: shape.position.x + shape.width / 2,
8179
8179
  y: shape.position.y + shape.height / 2
8180
8180
  });
8181
- return `<schematicrect schX={${center.x}} schY={${center.y}} width={${toMillimeters(shape.width)}} height={${toMillimeters(shape.height)}} strokeWidth={${toMillimeters(shape.lineWidth)}} color=${JSON.stringify(shape.color)}${shape.fillColor && shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
8181
+ return `<schematicrect schX={${center.x}} schY={${center.y}} width={${toMillimeters(shape.width)}} height={${toMillimeters(shape.height)}} color=${JSON.stringify(shape.color)}${shape.fillColor && shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
8182
8182
  }
8183
8183
  if (shape.type === "ELLIPSE") {
8184
8184
  const center = transformPoint(shape.center);
8185
- return `<schematiccircle center={{ x: ${center.x}, y: ${center.y} }} radius={${toMillimeters(Math.max(shape.radiusX, shape.radiusY))}} strokeWidth={${toMillimeters(shape.lineWidth)}} color=${JSON.stringify(shape.color)}${shape.fillColor && shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
8185
+ return `<schematiccircle center={{ x: ${center.x}, y: ${center.y} }} radius={${toMillimeters(Math.max(shape.radiusX, shape.radiusY))}} color=${JSON.stringify(shape.color)}${shape.fillColor && shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
8186
8186
  }
8187
8187
  if (shape.type === "POLYLINE" || shape.type === "POLYGON") {
8188
8188
  const isPolygon = shape.type === "POLYGON";
8189
8189
  const points = shape.points.map(transformPoint);
8190
8190
  if (isPolygon && points.length > 0) points.push(points[0]);
8191
- return `<schematicpath points={${JSON.stringify(points)}} strokeWidth={${toMillimeters(shape.lineWidth)}} strokeColor=${JSON.stringify(isPolygon ? shape.lineColor : shape.color)}${isPolygon && shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
8191
+ return `<schematicpath points={${JSON.stringify(points)}} strokeColor=${JSON.stringify(isPolygon ? shape.lineColor : shape.color)}${isPolygon && shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
8192
8192
  }
8193
8193
  if (shape.type === "PATH") {
8194
8194
  const transformedPath = transformSvgPath(shape.pathData, origin);
8195
8195
  if (!transformedPath) return void 0;
8196
- return `<schematicpath svgPath=${JSON.stringify(transformedPath)} strokeWidth={${shape.strokeWidth}} strokeColor=${JSON.stringify(shape.strokeColor)}${shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
8196
+ return `<schematicpath svgPath=${JSON.stringify(transformedPath)} strokeColor=${JSON.stringify(shape.strokeColor)}${shape.fillColor !== "none" ? ` isFilled fillColor=${JSON.stringify(shape.fillColor)}` : ""} />`;
8197
8197
  }
8198
8198
  if (shape.type === "ARC") {
8199
8199
  const transformedPath = transformSvgPath(shape.pathData, origin);
8200
8200
  if (!transformedPath) return void 0;
8201
- return `<schematicpath svgPath=${JSON.stringify(transformedPath)} strokeWidth={${toMillimeters(shape.lineWidth)}} strokeColor=${JSON.stringify(shape.color)} />`;
8201
+ return `<schematicpath svgPath=${JSON.stringify(transformedPath)} strokeColor=${JSON.stringify(shape.color)} />`;
8202
8202
  }
8203
8203
  if (shape.type === "TEXT") {
8204
8204
  if (shape.visibility !== "1") return void 0;