bpmn-js-element-id-displayer

1.0.3 • Public • Published

bpmn-js Element ID Displayer

A plugin for BPMN diagrams that displays element IDs directly on the diagram. This plugin is essential for debugging and understanding complex BPMN workflows, allowing you to easily visualize and identify each element by its unique ID.

Sample

Features

  • ID Display: Automatically displays the IDs of BPMN elements.
  • Customizable: Easily toggle which types of elements should display their IDs.
  • Seamless Integration: Works with BPMN-js out of the box.
  • Development and Production Builds: Optimized builds for both development and production environments.
  • Persistent Settings: User preferences for displaying IDs are saved in localStorage, ensuring settings persist across sessions.

Demo

You can see a live demo of this project here.

Usage

Installation

First, install the plugin using npm:

npm install bpmn-js-element-id-displayer

Example with BpmnModeler

Here is an example of how to use the bpmn-js Element ID Displayer plugin with BpmnModeler:

import BpmnModeler from 'bpmn-js/lib/Modeler';
import ElementIdDisplayer from 'bpmn-js-element-id-displayer';
import diagramXML from './diagram.bpmn';

const modeler = new BpmnModeler({
  container: '#canvas',
  additionalModules: [
    ElementIdDisplayer
  ]
});

modeler.importXML(diagramXML, function(err) {
  if (err) {
    console.error('Error importing BPMN diagram', err);
  } else {
    console.log('BPMN diagram imported successfully');
  }
});

Development

To start the development server, run:

npm start

Build

To build the library for production, run:

npm run build

This will create a bundled file bpmn-js-element-id-displayer.bundle.js in the dist directory.

Linting

To lint the code and automatically fix issues, run:

npm run lint

Package Sidebar

Install

npm i bpmn-js-element-id-displayer

Weekly Downloads

0

Version

1.0.3

License

ISC

Unpacked Size

59.3 kB

Total Files

13

Last publish

Collaborators

  • wizard8912