Skip to content

Commit 95fdfb0

Browse files
committed
Fix: json transformer
1 parent 6a950d9 commit 95fdfb0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/utils/transformer.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export const domBoothsToJSON = () => {
2121
return d3Extended.selectAll(`[${dataAttributes.elementType}="${ElementType.Booth}"]`).map((booth) => {
2222
return {
2323
id: booth.attr("id"),
24-
x: +booth.attr("cx"),
25-
y: +booth.attr("cy")
24+
x: +booth.attr("x"),
25+
y: +booth.attr("y")
2626
};
2727
});
2828
};
@@ -52,7 +52,8 @@ export const domShapesToJSON = () => {
5252
width: +shape.attr("width"),
5353
height: +shape.attr("height"),
5454
rx: shape.attr("rx") ? +shape.attr("rx") : undefined,
55-
color: rgbToHex(shape.style("stroke")) || shape.attr("stroke")
55+
color: rgbToHex(shape.style("color")) || shape.attr("color"),
56+
stroke: rgbToHex(shape.style("stroke")) || shape.attr("stroke")
5657
};
5758
});
5859
};

0 commit comments

Comments
 (0)