ljmshiki / oryx-editor

Automatically exported from code.google.com/p/oryx-editor
Other
0 stars 1 forks source link

displaced elements of BPMN 2.0 diagram #445

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.Load from repository a diagram.
2.view the diagram in the editor

What is the expected output?
the modelled diagram.

What do you see instead?
A diagram which elements have been displaced.

Please provide any additional information below.
when I import the json file of the diagram, I get the same displaced view of 
the diagram elements. 

Original issue reported on code.google.com by 123emma4...@googlemail.com on 30 Jun 2010 at 4:08

GoogleCodeExporter commented 8 years ago
I was able to reproduce the error and please find attached a patch for it.

Regards,
mtrovo

Original comment by moises.t...@gmail.com on 21 Sep 2010 at 8:48

Attachments:

GoogleCodeExporter commented 8 years ago
Are you sure this patch does what you need ? It just shortcuts the minimal 
computation of the container bounds for pools and lanes. What happens for 
subprocesses ? What happens if you place the task out of the pool bounds ?

Original comment by antoine....@gmail.com on 24 Sep 2010 at 3:07

GoogleCodeExporter commented 8 years ago
Sorry for the late reply.
Yeah it does, the elements are displaced because the event 
"layout.bpmn2_0.pool" is triggered before the elements are placed correctly 
within a pool.

As you can notice if you read the code on 
/editor/scripts/Plugins/bpmn2.0/bpmn2.0.js the method handleLayoutPool assumes 
that all elements are correctly placed and really fits within the pool as it 
is. The problem is that when the diagram is loaded all its elements are created 
on point(0,0), it means that the pool need to be resized prior to this event 
and that what this code does.

Notice also that the _oldBounds need to be set to the current value because the 
old value was referencing the (0,0) point, which is the origin of all the 
displacement.

Original comment by moises.t...@gmail.com on 17 Dec 2010 at 2:48