-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: [POC] Markers rendering improvements #2724
Conversation
e252415
to
65cdea9
Compare
…epare generalization # Conflicts: # src/component/mxgraph/shape/activity-shapes.ts # Conflicts: # src/component/mxgraph/shape/activity-shapes.ts
65cdea9
to
57f08f0
Compare
34d7d1e
to
9c4e975
Compare
Markers positioning - generalizationHere, the compensation marker is arbitrary added to the list of markers defined in the BPMN diagram. The adhoc marker is displayed using an pentagon.
|
Experiment usage of fixed size markers (reuse compensation marker)Reuse the existing "compensation" paint function and enforce that its width is "16" (absolute width of the other existing markers). Here, the compensation marker is arbitrary added to the list of markers defined in the BPMN diagram. The adhoc marker is displayed using an pentagon. |
4c89bcc
to
b4d50a4
Compare
This is needed for generalization
# Conflicts: # src/component/mxgraph/shape/activity-shapes.ts
2df9083
to
baeb659
Compare
- Tasks: compensation, comp + seq - expanded Subprocess: compensation, compensation + loop - Transaction: compensation + parallel
Update
|
…width) Useful for compensation and adhoc markers
Test an adhoc marker icon proposalTest the rendering with https://thenounproject.com/icon/tilde-651893/ which is proposed in #356 (comment) |
Using fixed width and experimenting smaller spacingThis is an experiment for #465, #475, #992. Enforce width of 16 and vertical align is centered. all markers with width set to 16, centered vertically and original spacing (set to 5)This includes the changes of the "painted loop" spacing set to 4spacing set to 3spacing set to 2spacing set to 0This demonstrates that there is no longer extra spacing added because of markers with non fixed sized. |
Experiment smaller marker width to give more place to the activity labelBy reducing the width, this reduces the height.
The following shows the impact on B.1.0 from miwg-test-suite
|
…NSTANCE_SEQUENTIAL
Closing, decisions taken and listed here are now tracked in #3146. |
DISCLAIMER: this is a POC, so it is not intended to be merged
Summary
Initially, this PR was created to experiment with marker enhancements in order to implement the rendering of the Ad-Hoc Subprocess.
Finally, this POC provides a solution to implement at least:
The experiments already leads to the creation of the following Pull Requests:
BpmnCanvas.setIconOriginForIconOnBottomLeft
#3050Conclusions and decisions
Decisions taken with @csouchet on
2024-04-04
Implement the following
12
, see chore: [POC] Markers rendering improvements #2724 (comment)1
, see chore: [POC] Markers rendering improvements #2724 (comment)4
, see chore: [POC] Markers rendering improvements #2724 (comment)Details of topics covered
This PR experiment fixes and improvements for the following topics:
getMarkerOriginFunction
:To be investigated for marker whose height is larger than the width. We could decide to not handle this case as the adhoc and compensation marker are going to have a larger width than its height--> no use case, so skip investigationSHAPE_ACTIVITY_MARKER_ICON_WIDTH: 16
StyleDefault
is 20 whereas the actual width of markers is 16 (except for the loop marker). Provide a screenshot of the rendering with spacing between the markers is set to 0 to show the issue,Identified issues that this POC tries to cover
Too large spacing between 2 markers
This POC provides a fix for this. The implementation to generalize markers positioning for 3 markers and more also uses the same logic.
Previously, the translation includes SHAPE_ACTIVITY_MARKER_ICON_SIZE instead of SHAPE_ACTIVITY_MARKER_ICON_SIZE/2. The following schema explains why the value has to be divided by 2 👇🏿
The current value of
StyleDefault.SHAPE_ACTIVITY_MARKER_ICON_SIZE
is not accurateWhen using a spacing of 0, the 2 markers should be stacked together but this is not the case.
The "width" is configured to 20 whereas the actual icon size is currently 16. So it is larger by 4.
0
-2
Unable to use markers shape not defined with 16x16 dimensions
The following screenshots demonstrate the problem by replacing the "loop marker" by some icons with specific dimensions
Notice that the dimensions of the "loop marker" are not 16x16 but "width: 22.49, height: 21.62". They are closed to 16x16 so the problem is not very visible
paintDoubleLeftArrowheadsIcon
paintCircleIcon
paintAsteriskIcon
This POC proposes an experimental implementation to use a fixed width for markers.
See #2724 (comment)