Navigated viewer with the prepackaged libraries


#1

Hi, I am currently using this Viewer example in my application:

I would rather have the NavigatedViewer style in my application. Or a readonly Modeller so to speak…

How can I do this with the pre-packaged libraries?

Thanks


#2

We don’t bundle the navigated viewer right now but it could be something to add in the future.


#3

That would be nice!

I saw an example somewhere that I had to add modules to the viewer… do you have an example how to do that with the packages bundle?


#4

You may pass additional configuration to the individual DMN viewers via their viewer ID (defined here). Using this mechanism you may pass the additional navigation modules to the drd viewer:

<script src="https://unpkg.com/dmn-js@4.3.1/dist/dmn-viewer.development.js"></script>
<script>
  var MoveCanvasModule = ...;
  var ZoomScrollModule = ...;
 
  var viewer = new DmnJS({
    container: '#someEl',
    drd: {
      additionalModules: [
        MoveCanvasModule,
        ZoomScrollModule,
        ...
      ]
    }
  });
</script>

#5

Thanks!

Silly question… what do I put into the …?