Skip to content

Commit 3ac386a

Browse files
committed
update config
1 parent 952fa93 commit 3ac386a

File tree

4 files changed

+23
-36
lines changed

4 files changed

+23
-36
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
### Changed
1313

14+
* Fixed broken import `from compas.utilities import pairwise`.
15+
* Changed viewer initalisation to use default config object and not config from json.
16+
* Changed `compas_notebook.config.SidebarConfig.show` to `False`.
17+
1418
### Removed
1519

20+
* Removed `load_scene` and `save_scene` from default toolbar.
21+
1622

1723
## [0.6.0] 2024-04-17
1824

src/compas_notebook/config.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

src/compas_notebook/config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def __post_init__(self):
3434

3535
@dataclass
3636
class SidebarConfig:
37-
show: bool = True
37+
show: bool = False
3838
items: list[dict[str, str]] = None
3939

4040

src/compas_notebook/viewer.py

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import pathlib
2-
31
import ipywidgets as widgets
42
import pythreejs as three
53
from compas.colors import Color
@@ -41,12 +39,10 @@ class Viewer:
4139
def __init__(
4240
self,
4341
config: Config = None,
44-
configpath: str = None,
4542
scene: Scene = None,
4643
controller: Controller = None,
4744
):
48-
configpath = configpath or pathlib.Path(__file__).parent / "config.json"
49-
self.config = config or Config.from_json(configpath)
45+
self.config = config or Config()
5046
self.scene = scene or Scene(context="Notebook")
5147
self.controller = controller or Controller(viewer=self)
5248

@@ -289,21 +285,21 @@ def make_toolbar(self) -> widgets.HBox:
289285
"""
290286
buttons = []
291287

292-
load_scene_button = widgets.Button(
293-
icon="folder-open",
294-
tooltip="Load scene",
295-
layout=widgets.Layout(width="48px", height="32px"),
296-
)
297-
load_scene_button.on_click(lambda x: self.controller.load_scene())
298-
buttons.append(load_scene_button)
299-
300-
save_scene_button = widgets.Button(
301-
icon="save",
302-
tooltip="Load scene",
303-
layout=widgets.Layout(width="48px", height="32px"),
304-
)
305-
save_scene_button.on_click(lambda x: self.controller.save_scene())
306-
buttons.append(save_scene_button)
288+
# load_scene_button = widgets.Button(
289+
# icon="folder-open",
290+
# tooltip="Load scene",
291+
# layout=widgets.Layout(width="48px", height="32px"),
292+
# )
293+
# load_scene_button.on_click(lambda x: self.controller.load_scene())
294+
# buttons.append(load_scene_button)
295+
296+
# save_scene_button = widgets.Button(
297+
# icon="save",
298+
# tooltip="Load scene",
299+
# layout=widgets.Layout(width="48px", height="32px"),
300+
# )
301+
# save_scene_button.on_click(lambda x: self.controller.save_scene())
302+
# buttons.append(save_scene_button)
307303

308304
zoom_in_button = widgets.Button(
309305
icon="search-plus",

0 commit comments

Comments
 (0)