Skip to content

feat: experiment translating elements [POC]#2885

Closed
tbouffard wants to merge 9 commits into
masterfrom
poc/move_element_on_top_left
Closed

feat: experiment translating elements [POC]#2885
tbouffard wants to merge 9 commits into
masterfrom
poc/move_element_on_top_left

Conversation

@tbouffard

@tbouffard tbouffard commented Sep 22, 2023

Copy link
Copy Markdown
Member

DISCLAIMER

  • this is a POC, so it is not intended to be merged
  • please don't push new commit except if we agree together 😸

Content

Experiment ways to display a displayed pool at the bottom of the container
For example: given a diagram with several pools, I filtered the last one, the other are filtered but if I do Fit.None, it is placed at the bottom of the container with a large blank area on top of it.

The elements identification demo has been updated

  • no more fit center
  • add a button to translate a given element
  • work with pool but also with any kind of elements (I didn't test with flows)
  • last commit with a container without fixed dimension (also work when dimension are set 3e74d8d)
  • Unrelated: experiment the usage of graph.scrollCellToVisible with and without center (only work with fixed size container
    2c4f029)

How to use the demo preview

Access the page with specific query parameter like in
https://process-analytics-bpmn-visualization-js-demo_preview-pr-2885.surge.sh/dev/public/elements-identification.html?&translate.bpmn.id=Participant_16gpg6s&bpmn.filter.pool.ids=Participant_16gpg6s (to use with /test/fixtures/bpmn/bpmn-rendering/pools.03.black.box.bpmn)

  • translate.bpmn.id (new in this POC): specific parameter to choose the BPMN element used as reference for the translation
  • bpmn.filter.pool.ids: the id of the pool to filter if required. If you want to test the translation of the pool after filtering it, use the same value in both parameters

Examples

If not mentioned:

2 pools, translate the first one

It shows that after load or after panning or zooming, the translation works

translate_pools.03.black.box_1st_process.mp4

filter and translate the 2nd pool and navigation

translate_pools.03.black.box_2nd_process_01_all.mp4

filter and translate the 2nd pool in a bpmn-container without fixed size

The blank area at the bottom of the pool is due to the usage of a pool with a small height impacted by the min-height set by mxgraph on the SVG child element of the bpmn-container.

translate_pools.03.black.box_2nd_process_03_filtered_floating_bpmn-container.mp4

B.1.0

diagram: https://github.com/bpmn-miwg/bpmn-miwg-test-suite/blob/9e8416f04db90c25d93a39d34719c9cdc62848c2/Reference/B.1.0.bpmn
Filter and translate the 2nd diagram: https://process-analytics-bpmn-visualization-js-demo_preview-pr-2885.surge.sh/dev/public/elements-identification.html?&translate.bpmn.id=_0623a9bd-fd34-462a-b09d-85cb5004be78&bpmn.filter.pool.ids=_0623a9bd-fd34-462a-b09d-85cb5004be78

translate_B.1.0_filter_2nd_process.mp4

Translate an activity of one of the pool

Use /dev/public/elements-identification.html?&translate.bpmn.id=Activity_076kxm8 with https://github.com/process-analytics/bpmn-visualization-examples/blob/v0.40.0/bpmn-files/subprocesses_event_and_transaction.bpmn

translate_subprocesses_event_and_transaction_01_activity.mp4

Unrelated: graph.scrollCellToVisible (center=true)

Tested locally with 2c4f029
http://localhost:10001/dev/public/elements-identification.html?&translate.bpmn.id=Activity_076kxm8 with https://github.com/process-analytics/bpmn-visualization-examples/blob/v0.40.0/bpmn-files/subprocesses_event_and_transaction.bpmn

translate_subprocesses_event_and_transaction_02_scrollCellToVisible_activity.mp4

@tbouffard tbouffard added poc 💫 Experimentation to discuss about future implementation. Not intended to be merged BPMN diagram navigation Zoom, Pan, Fit labels Sep 22, 2023
@tbouffard tbouffard self-assigned this Sep 22, 2023
@github-actions

github-actions Bot commented Sep 22, 2023

Copy link
Copy Markdown

♻️ PR Preview bed2c02 has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

@tbouffard

Copy link
Copy Markdown
Member Author

POC completed, so closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BPMN diagram navigation Zoom, Pan, Fit poc 💫 Experimentation to discuss about future implementation. Not intended to be merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant