Skip to content

Commit

Permalink
Clear ymaps before updating new values
Browse files Browse the repository at this point in the history
  • Loading branch information
trungleduc authored Feb 27, 2024
1 parent 83974a2 commit a18f241
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions python/jupytercad_core/jupytercad_core/jcad_ydoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,13 @@ def set(self, value: str) -> None:
self._yobjects.clear()
self._yobjects.extend(newObj)

self._yoptions.clear()
self._yoptions.update(valueDict["options"])

self._ymetadata.clear()
self._ymetadata.update(valueDict["metadata"])

self._youtputs.clear()
self._youtputs.update(valueDict["outputs"])

def observe(self, callback: Callable[[str, Any], None]):
Expand Down

0 comments on commit a18f241

Please sign in to comment.