How to use bpmn-js-token-simulation - 3 common examples

To help you get started, we’ve selected a few bpmn-js-token-simulation examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github bpmn-io / bpmn-js-token-simulation-plugin / client / client.js View on Github external
var registerBpmnJSPlugin = require('camunda-modeler-plugin-helpers').registerBpmnJSPlugin;

var tokenSimulation = require('bpmn-js-token-simulation'),
    HideModelerElements = require('./HideModelerElements');

tokenSimulation.__init__.push('hideModelerElements');
tokenSimulation.hideModelerElements = [ 'type', HideModelerElements ];

registerBpmnJSPlugin(tokenSimulation);
github bpmn-io / bpmn-js-token-simulation-plugin / client / client.js View on Github external
var registerBpmnJSPlugin = require('camunda-modeler-plugin-helpers').registerBpmnJSPlugin;

var tokenSimulation = require('bpmn-js-token-simulation'),
    HideModelerElements = require('./HideModelerElements');

tokenSimulation.__init__.push('hideModelerElements');
tokenSimulation.hideModelerElements = [ 'type', HideModelerElements ];

registerBpmnJSPlugin(tokenSimulation);
github bpmn-io / bpmn-js-token-simulation-plugin / client / HideModelerElements.js View on Github external
function HideModelerElements(eventBus) {
  var css = '.properties.hidden { display: none; } .tabs .tab.hidden { display: none; }',
      head = document.head,
      style = document.createElement('style');

  style.type = 'text/css';

  style.appendChild(document.createTextNode(css));

  head.appendChild(style);

  eventBus.on(TOGGLE_MODE_EVENT, function(context) {
    var simulationModeActive = context.simulationModeActive;

    var propertiesPanel = domQuery('.properties');
    var xmlTab = domQuery('[data-tab-id="xml"') || domQuery('.tabs a.tab:not(.active)');

    if (simulationModeActive) {
      domClasses(propertiesPanel).add('hidden');
      domClasses(xmlTab).add('hidden');
    } else {
      domClasses(propertiesPanel).remove('hidden');
      domClasses(xmlTab).remove('hidden');
    }
  });
}

bpmn-js-token-simulation

bpmn-js token simulation extension

MIT
Latest version published 1 month ago

Package Health Score

81 / 100
Full package analysis

Similar packages