mirror of
https://github.com/bpmn-io/bpmn-js.git
synced 2025-05-20 00:26:04 +08:00
feat(library): add navigated viewer
This adds an additional viewer variant that contains canvas navigation features. Related to #169
This commit is contained in:
23
lib/NavigatedViewer.js
Normal file
23
lib/NavigatedViewer.js
Normal file
@ -0,0 +1,23 @@
|
||||
var Viewer = require('./Viewer');
|
||||
|
||||
/**
|
||||
* A viewer that includes mouse navigation facilities
|
||||
*
|
||||
* @param {Object} options
|
||||
*/
|
||||
function NavigatedViewer(options) {
|
||||
Viewer.call(this, options);
|
||||
}
|
||||
|
||||
NavigatedViewer.prototype = Object.create(Viewer.prototype);
|
||||
|
||||
module.exports = NavigatedViewer;
|
||||
|
||||
NavigatedViewer.prototype._navigationModules = [
|
||||
require('diagram-js/lib/navigation/zoomscroll'),
|
||||
require('diagram-js/lib/navigation/movecanvas')
|
||||
];
|
||||
|
||||
NavigatedViewer.prototype._modules = [].concat(
|
||||
NavigatedViewer.prototype._modules,
|
||||
NavigatedViewer.prototype._navigationModules);
|
Reference in New Issue
Block a user