bpmn-js/lib/NavigatedViewer.js
Nico Rehwaldt 645265ad7e chore(editor-actions): make dependencies optional
* Treat features as optional dependencies and register action
  only if feature exists
* Explicitly add features to the Modeler and NavigatedViewer types
2018-10-29 14:52:41 +00:00

28 lines
739 B
JavaScript

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);