How to use the bpmn-js-token-simulation/lib/util/EventHelper.TOGGLE_MODE_EVENT function in bpmn-js-token-simulation

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 / 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 29 days ago

Package Health Score

84 / 100
Full package analysis

Similar packages