You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
typeScrollElementOptions={// same as bpmn-visualization OverlayShapePosition + 'center' and 'visible'position?: 'top-left'|'top-right'|'top-center'|'bottom-left'|'bottom-right'|'bottom-center'|'middle-left'|'middle-right'|'center'|'visible',// default 'top-left'margin-bottom?: number,// default 0margin-left?: number,// default 0margin-right?: number,// default 0margin-top?: number,// default 0}scrollElement(bpmnId: string,options?: {}): void
The margin properties don't always apply. For example:
for the top-left position, only the margin-left and margin-top apply
for the center position, no margin applies
for the visible position, some margin may apply depending on the chosen implementation
Negative 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).
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:
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 process-analytics/bpmn-visualization-js#2885Implementation of visible/center
mxGraph.scrollToVisible
The text was updated successfully, but these errors were encountered: