easyeda 0.0.349 → 0.0.351
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/browser/index.js +11 -0
- package/dist/browser/index.js.map +1 -1
- package/dist/index.js +11 -0
- package/dist/index.js.map +1 -1
- package/dist/main.cjs +12 -1
- package/dist/main.cjs.map +1 -1
- package/package.json +1 -1
package/dist/browser/index.js
CHANGED
|
@@ -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
|