File tree Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Expand file tree Collapse file tree 1 file changed +5
-13
lines changed Original file line number Diff line number Diff line change @@ -978,20 +978,12 @@ const ViewerView = widgets.DOMWidgetView.extend({
978
978
interactor . onEndPinch ( onCameraChanged )
979
979
const vtkCamera = this . model . itkVtkViewer . getViewProxy ( ) . getCamera ( )
980
980
vtkCamera . onModified ( onCameraChanged )
981
- const defaultClickCallback = this . model . itkVtkViewer
982
- . getViewProxy ( )
983
- . getClickCallback ( )
984
- if ( defaultClickCallback ) {
985
- const widgetModel = this . model
986
- function extendedClickCallback ( lastPickedValues ) {
987
- defaultClickCallback ( lastPickedValues )
988
- widgetModel . set ( 'clicked_slice_point' , lastPickedValues )
989
- widgetModel . save_changes ( )
990
- }
991
- this . model . itkVtkViewer
992
- . getViewProxy ( )
993
- . setClickCallback ( extendedClickCallback )
981
+ const onClickSlicePoint = ( lastPickedValues ) => {
982
+ this . model . set ( 'clicked_slice_point' , lastPickedValues )
983
+ this . model . save_changes ( )
994
984
}
985
+ this . model . itkVtkViewer
986
+ . on ( 'imagePicked' , onClickSlicePoint )
995
987
996
988
const point_sets = this . model . get ( 'point_sets' )
997
989
if ( point_sets ) {
You can’t perform that action at this time.
0 commit comments