bpmn-io / bpmn-js-properties-panel

A properties panel for bpmn-js.
MIT License
290 stars 196 forks source link

Can I use more than one propertiesProvider for bpmn-js-properties-panel? #304

Closed incidunt closed 5 years ago

incidunt commented 5 years ago

I have create a propertiesProvider of my own , but I want to use some some features of the camundaModdleDescriptor, is that possible? I tried like like this , but it didn't work, only the tab of magicModdleDescriptor is showed, but the camundaModdleDescriptor didn't show. how can I do that ? Thanks!

// Use with Camunda properties
import propertiesProviderModule from 'bpmn-js-properties-panel/lib/provider/camunda'
import camundaModdleDescriptor from 'camunda-bpmn-moddle/resources/camunda'

import magicpropertiesProviderModule from '../provider/magic';
import magicModdleDescriptor from '../descriptors/magic';

//.

    this.bpmnModeler = new BpmnModeler({
      container: canvas,
      propertiesPanel: {
        parent: '#js-properties-panel'
      },
      additionalModules: [
        propertiesProviderModule, 
        magicpropertiesProviderModule,
        propertiesPanelModule
      ],
      moddleExtensions: {
        camunda: camundaModdleDescriptor,
        magic: magicModdleDescriptor

      },

    })
philippfromme commented 5 years ago

Using two providers is possible but it's a bit hacky at the moment. You can see an example here: https://github.com/philippfromme/camunda-modeler-set-position-plugin/blob/master/client/module.js#L223