Skip to content

Commit

Permalink
[refactor] rename svg_from_json => to_svg (#993)
Browse files Browse the repository at this point in the history
  • Loading branch information
sotetsuk authored Oct 19, 2021
1 parent 225694d commit c367397
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mjx/visualizer/svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ def _make_svg(
return dwg


def svg_from_json(json_data: str, target_idx: Optional[int] = None) -> str:
def to_svg(json_data: str, target_idx: Optional[int] = None) -> str:
proto_data = MahjongTable.json_to_proto(json_data=json_data)
dwg = _make_svg(proto_data, ".svg", target_idx)
return '<?xml version="1.0" encoding="utf-8" ?>\n' + dwg.tostring()
Expand Down

0 comments on commit c367397

Please sign in to comment.