From d2fbdb7f76aef8e281c0bf86a7aa4d9300bac737 Mon Sep 17 00:00:00 2001 From: Xavier Artusi Date: Sat, 13 Jun 2020 09:55:36 +0200 Subject: [PATCH] [VTK Fix] Ensure camera change is emit after mouse interaction --- panel/models/vtk/vtklayout.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/panel/models/vtk/vtklayout.ts b/panel/models/vtk/vtklayout.ts index 574d2d72bc..2ccb9f5487 100644 --- a/panel/models/vtk/vtklayout.ts +++ b/panel/models/vtk/vtklayout.ts @@ -232,7 +232,10 @@ export abstract class AbstractVTKView extends PanelHTMLBoxView { // update camera model state only at the end of the interaction // with the scene (avoid bouncing events and large amount of events) - const update_model_camera = () => this._get_camera_state() + const update_model_camera = () => { + this._get_camera_state() + this.model.properties.camera.change.emit() + } const interactor = this._vtk_renwin.getInteractor() const event_list = ["LeftButtonRelease", "RightButtonRelease", "EndAnimation"] event_list.forEach((event) => interactor['on' + event](update_model_camera))