Skip to content
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

Sub Process moves position #1418

Closed
mschoe opened this issue Jun 28, 2019 · 6 comments
Closed

Sub Process moves position #1418

mschoe opened this issue Jun 28, 2019 · 6 comments
Labels
bug Something isn't working

Comments

@mschoe
Copy link
Member

mschoe commented Jun 28, 2019

Describe the Bug

Sub Process moves position after expand & collapse operation

Steps to Reproduce

// given
element chain of star event --> task --> end event

// when
I perform the follwong operations:

  1. transform task into expanded sub process
  2. collapse the sub process
  3. expand the sub process

// then
the position of the sub process has moved and is not aligned with the other elements anymore

ezgif-2-066b632b5011

Expected Behavior

sub process keeps position

Environment

Please complete the following information:

  • OS: linux
  • Camunda Modeler Version: [3.2.0 nightly-190628]
@mschoe mschoe added the bug Something isn't working label Jun 28, 2019
@nikku nikku added the ready Ready to be worked on label Jun 28, 2019
@nikku nikku added this to the M29 milestone Jun 28, 2019
@barmac
Copy link
Contributor

barmac commented Jun 28, 2019

Related to bpmn-io/bpmn-js#1026, bpmn-io/bpmn-js#1052

@pinussilvestrus
Copy link
Contributor

Could also be related to bpmn-io/bpmn-js#1103

@pinussilvestrus
Copy link
Contributor

pinussilvestrus commented Jul 1, 2019

Root Cause

Regarding the vertical movement:

The misalignment comes from an offset generated by GridSnapping.

Cf.ToggleElementCollapseBehavior autoResize to grid. This introduces the bug for not-yet-snapped diagrams.

However, this does not also cause the horizontal movement when transforming the task to a subprocess. Further investigation needed.

@pinussilvestrus
Copy link
Contributor

pinussilvestrus commented Jul 2, 2019

Regarding the horizontal movement of the SubProcess:

The movement resolves in newly calculated optimal bounds which takes the automatically created start event into account. That's why the start Event seems to be moved inside the SubProcess after re-expanding (as the screencast above reveals).

This behavior is also shown in previous version v3.x.x when expanding collapsed subProcesses which have children

Jul-02-2019 10-45-22

The behavior described above with empty subProcesses only comes from the fact we're automatically creating a new startEvent when morphing a task to an expanded subProcess. This relates to bpmn-io/bpmn-js#1031

So this is not a regression . It is caused by the fact when calculating the new bounds in AutoResize we take the collapsed subProcess and the elements of the expanded subProcess into account. Due to the fact it indicates the children outside of the colapsed subProcess' bounds, it adds an offset to the left, which is visually visible by the horizontal movement.

To fix this, we will have to somehow save the bounds from the expanded subProcess. For example via Extension Element.

@pinussilvestrus
Copy link
Contributor

After a discussion with @volkergersabeck we concluded to postpone this when we tackle an overall improvement-run regarding Modeling with SubProcesses in the next quarter. This will include several improvements like this one or #1244, #1343.

Roo-Cause-Analysis is described in following commits

@pinussilvestrus pinussilvestrus removed this from the M29 milestone Jul 2, 2019
@pinussilvestrus pinussilvestrus added backlog Queued in backlog and removed in progress Currently worked on labels Jul 2, 2019
@pinussilvestrus pinussilvestrus removed their assignment Jul 2, 2019
@nikku
Copy link
Member

nikku commented Nov 6, 2020

Closing this as we do not allow to collapse sub-processes anymore.

@nikku nikku closed this as completed Nov 6, 2020
@bpmn-io-tasks bpmn-io-tasks bot removed the backlog Queued in backlog label Nov 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants