Skip to content

Commit

Permalink
add default min width/height to circuit renderer config
Browse files Browse the repository at this point in the history
  • Loading branch information
DNA386 committed Oct 10, 2024
1 parent 8dcc370 commit 242f90a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions pytket/pytket/circuit/display/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,11 @@ class CircuitDisplayConfig(PytketExtConfig):

@classmethod
def from_extension_dict(cls, ext_dict: dict[str, Any]) -> "CircuitDisplayConfig":
min_h = ext_dict.get("min_height")
min_w = ext_dict.get("min_width")
return CircuitDisplayConfig(
min_height=str(ext_dict.get("min_height")),
min_width=str(ext_dict.get("min_width")),
min_height=str(min_h) if min_h is not None else "400px",
min_width=str(min_w) if min_w is not None else "500px",
orient=ext_dict.get("orient"),
render_options=RenderOptions(
**(ext_dict["render_options"] if "render_options" in ext_dict else {})
Expand Down

0 comments on commit 242f90a

Please sign in to comment.