Hello everyone,
I would like to change the group-toggle element found in groups in the properties panel to be an arrow (up or down) next to (and behind) the headline. I found the code that generates the element here but am at a loss as to how to override this. What I have so far is:
import inherits from 'inherits';
import PropertiesPanel from 'bpmn-js-properties-panel/lib/PropertiesPanel'
var escapeHTML = require('bpmn-js-properties-panel/lib/Utils').escapeHTML;
var domClasses = require('min-dom').classes,
domify = require('min-dom').domify;
var forEach = require('lodash/forEach');
export default function CustomPropertiesPanel(
config, injector, eventBus,
modeling, commandStack, canvas) {
PropertiesPanel.call(this,
config, injector, eventBus,
modeling, commandStack, canvas);
this._createPanel = (element, tabs) => {
console.log("§test");
var self = this;
var panelNode = domify('<div class="bpp-properties test"></div>'),
... (copy of original code removed for brevity)
};
}
inherits(CustomPropertiesPanel, PropertiesPanel)
The console output is called, but the test-class I added to the panelNode does not appear. Neither do any other changes I make to the panel generation code. So while I have succeded in creating a custom panel that is being called, it does not seem to replace the existing one. In case it is relevant: I add the custom panel to my application like this:
// index.js next to the CustomPropertiesPanel
import CustomPropertiesPanel from './CustomPropertiesPanel'
export default {
__init__: ["customPropertiesPanel"],
customPropertiesPanel: ["type", CustomPropertiesPanel]
};
// In the main index.js
import customPropertiesPanel from './custom/propertiesPanel';
var bpmnModeler = new BpmnModeler({
...
additionalModules: [
customPropertiesPanel,
...
]
});