Skip to content

Commit

Permalink
remove "is_initialized" from scene_view.py
Browse files Browse the repository at this point in the history
  • Loading branch information
afullerx committed Aug 5, 2024
1 parent 5e06f90 commit 9839b4b
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions nicegui/elements/scene_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ def __init__(self,
self._props['camera_type'] = self.camera.type
self._props['camera_params'] = self.camera.params
self._click_handlers = [on_click] if on_click else []
self.is_initialized = False
self.on('init', self._handle_init)
self.on('click3d', self._handle_click)

Expand All @@ -53,7 +52,6 @@ def on_click(self, callback: Callable[..., Any]) -> Self:
return self

def _handle_init(self, e: GenericEventArguments) -> None:
self.is_initialized = True
with self.client.individual_target(e.args['socket_id']):
self.move_camera(duration=0)

Expand All @@ -65,8 +63,6 @@ async def initialized(self) -> None:
await event.wait()

def run_method(self, name: str, *args: Any, timeout: float = 1, check_interval: float = 0.01) -> AwaitableResponse:
if not self.is_initialized:
return NullResponse()
return super().run_method(name, *args, timeout=timeout, check_interval=check_interval)

def _handle_click(self, e: GenericEventArguments) -> None:
Expand Down

0 comments on commit 9839b4b

Please sign in to comment.