Skip to content

Commit

Permalink
Merge pull request #1 from chenkasirer/main
Browse files Browse the repository at this point in the history
using default_factory in default config
  • Loading branch information
tomvanmele authored Mar 14, 2024
2 parents 98638f6 + c9fd904 commit 759af06
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Changed

* Fixed `ValueError` when starting viewer for the first time with default config.

### Removed


Expand Down
2 changes: 1 addition & 1 deletion src/compas_notebook/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class CameraConfig:
@dataclass
class ViewConfig:
viewport: Literal["top", "perspective"] = "perspective"
background: Color = Color.from_hex("#eeeeee")
background: Color = field(default_factory=lambda: Color.from_hex("#eeeeee"))
width: float = 1100
height: float = 580
show_grid: bool = True
Expand Down

0 comments on commit 759af06

Please sign in to comment.