Skip to content

Commit 1570f6c

Browse files
committed
Fix: polyline color extraction
1 parent af2f0cf commit 1570f6c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/utils/transformer.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ export const domPolylineToJSON = () => {
7070
const [x, y] = point.split(",");
7171
return { x: +x, y: +y };
7272
}),
73-
section: polyline.attr(dataAttributes.section)
73+
section: polyline.attr(dataAttributes.section),
74+
color: rgbToHex(polyline.style("color")) || polyline.attr("color"),
75+
stroke: rgbToHex(polyline.style("stroke")) || polyline.attr("stroke")
7476
};
7577
});
7678
};

0 commit comments

Comments
 (0)