[Hanging protocols] Callback sending an action to a viewport: reset viewport on stage change


I’m trying to implement a mammography handing protocols, with the stages having 1x4 or 1x2 images.

Cornerstone sometimes keeps the zoom on the viewports while switching between the stages.
Hence, I need to reset the views at each change of the stage.

I would like to do it programmatically and the onViewportDataInitialized callback appears to be the right place to do it. However the following code has no effect. Could anyone guide me trhough

const hpMG: Types.HangingProtocol.Protocol = {
  id: '@ohif/mnMG',
  description: 'Has various hanging protocol grid layouts',
  name: 'MG_hp',
  callbacks: {
    onViewportDataInitialized: [
        commandName: 'resetViewport',
        commandOptions: {}