Skip to content

Commit

Permalink
Fix: json transformer
Browse files Browse the repository at this point in the history
  • Loading branch information
Akalanka47000 committed Feb 26, 2024
1 parent 6a950d9 commit 95fdfb0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/utils/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export const domBoothsToJSON = () => {
return d3Extended.selectAll(`[${dataAttributes.elementType}="${ElementType.Booth}"]`).map((booth) => {
return {
id: booth.attr("id"),
x: +booth.attr("cx"),
y: +booth.attr("cy")
x: +booth.attr("x"),
y: +booth.attr("y")
};
});
};
Expand Down Expand Up @@ -52,7 +52,8 @@ export const domShapesToJSON = () => {
width: +shape.attr("width"),
height: +shape.attr("height"),
rx: shape.attr("rx") ? +shape.attr("rx") : undefined,
color: rgbToHex(shape.style("stroke")) || shape.attr("stroke")
color: rgbToHex(shape.style("color")) || shape.attr("color"),
stroke: rgbToHex(shape.style("stroke")) || shape.attr("stroke")
};
});
};
Expand Down

0 comments on commit 95fdfb0

Please sign in to comment.