# all files / bpmn-js/lib/ NavigatedViewer.js

100% Statements 4/4
100% Branches 0/0
100% Functions 1/1
100% Lines 4/4

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28

    5×

    1×

    1×

    1×

     import inherits from 'inherits';

    import Viewer from './Viewer';

    import KeyboardMoveModule from 'diagram-js/lib/navigation/keyboard-move';
    import MoveCanvasModule from 'diagram-js/lib/navigation/movecanvas';
    import ZoomScrollModule from 'diagram-js/lib/navigation/zoomscroll';

    /**
     * A viewer that includes mouse navigation facilities
     *
     * @param {Object} options
     */
    export default function NavigatedViewer(options) {
      Viewer.call(this, options);
    }

    inherits(NavigatedViewer, Viewer);

    NavigatedViewer.prototype._navigationModules = [
      KeyboardMoveModule,
      MoveCanvasModule,
      ZoomScrollModule
    ];

    NavigatedViewer.prototype._modules = [].concat(
      NavigatedViewer.prototype._modules,
      NavigatedViewer.prototype._navigationModules);