Is your feature request related to a problem? Please describe.
A BPMN element may require special attention, so it may be required to position/scroll it at a specific location in the BPMN container.
Describe the solution you'd like
Implement a ScrollElementsApiPlugin plugin that provides an API to scroll an BPMN element given its id.
This will be a generalization of #165.
This should work when the BPMN container has scrollbars.
Is your feature request related to a problem? Please describe.
A BPMN element may require special attention, so it may be required to position/scroll it at a specific location in the BPMN container.
Describe the solution you'd like
Implement a
ScrollElementsApiPlugin
plugin that provides an API to scroll an BPMN element given its id. This will be a generalization of #165. This should work when the BPMN container has scrollbars.API proposal
The margin properties don't always apply. For example:
top-left
position, only themargin-left
andmargin-top
applycenter
position, no margin appliesvisible
position, some margin may apply depending on the chosen implementationNegative values for margins could be accepted.
Disclaimer: this will probably only work with a BPMN container that have a "fixed computed size" (as for the fit feature).
Name of the plugin. Be consistent with:
164
167
168
Future implementation: we may provide another plugin that takes the name of the BPMN element instead of its id, as we do in #75 or #76.
Screenshots
Positions and margins
Scrolling an hidden elements to make it visible
Additional context
A POC has been done for the
top-left
andcenter
position in https://github.com/process-analytics/bpmn-visualization-js/pull/2885Implementation of visible/center
mxGraph.scrollToVisible