customBpmn.js
import inherits from "inherits";
import Viewer from "bpmn-js/lib/Viewer";
import ZoomScrollModule from "diagram-js/lib/navigation/zoomscroll";
import MoveCanvasModule from "diagram-js/lib/navigation/movecanvas";
function CustomViewer(options) {
Viewer.call(this, options);
}
inherits(CustomViewer, Viewer);
CustomViewer.prototype._modules = [].concat(Viewer.prototype._modules, [ZoomScrollModule, MoveCanvasModule]);
export {
CustomViewer
};
效果图:
核心代码
const eventBus = this.bpmnViewer.get('eventBus');
eventBus.on('element.hover', function(event) {
const element = event.element;
const arr = that.lcData
const obj = arr.find(item=> it
标签:inherits,Canvas,const,bpmn,显示信息,js,Viewer,import,CustomViewer
From: https://blog.csdn.net/huichao199175/article/details/140666286