Status: New
Owner: ---- CC: [hidden email] Labels: Type-Defect Priority-Medium Component-Mondrian Milestone-4.4 New issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 Another issue related to complex shapes. Try the following code: view shape umlClass. view node: 'hello' forIt: [ view shape umlClass. view nodes: (1 to: 5). view verticalLineLayout ] You will see that the children now move properly with the parent node, but they are not positioned correctly. However, it works well with simple shapes for the children. A more complex example can be seen below: view shape umlClass. view node: 'hello' forIt: [ view shape umlClass. view nodes: (1 to: 5) forEach: [:each | view shape umlClass. view nodes: (1 to: each ). view verticalLineLayout ]. view verticalLineLayout ] _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #1 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 I reproduced this situation without #umlClass: -=-=-=-=-=-=-=-=-=-=-=-= view shape form: [:b | b column; fill; row; fill; row; fill; row; fill. b x:1 y:1 add: (MORectangleShape new width: 80; height: 50). b x:1 y:2 add: (MORectangleShape new width: 80; height: 100) ]. view node: 'outter node' forIt: [ view shape form: [:b | b column; fill; row; fill; row; fill; row; fill. b x:1 y:1 add: (MORectangleShape new width: 20; height: 30). b x:1 y:2 add: (MORectangleShape new width: 20; height: 50) ]. view node: 'hello world'] -=-=-=-=-=-=-=-=-=-=-=-= But what the result is supposed to be? Since in the shape of 'outter node' there is no children shape, I suspect this example is ill conceived. Should the inner node be located in the upper or in the lower part? Will the inner node be in (1,2) If the shape of the outter node is: ?? -=-=-=-=-=-=-=-=-=-=-=-= view shape form: [:b | b column; fill; row; fill; row; fill; row; fill. b x:1 y:1 add: (MORectangleShape new width: 80; height: 50). b x:1 y:2 add: (MORectangleShape new width: 80; height: 100). b x:1 y:2 add: (MOChildrenShape new) ]. -=-=-=-=-=-=-=-=-=-=-=-= This does not work for now, so this is a bug. But before fixing it, I would like to be sure of the semantic on FormsBuilder. In general, I have the impression that many point are not clear in its semantics. This is why it is so buggy. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #2 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 I do not understand. umlClass does specify a ChildrenShape: umlClassWithTitle: aBlock | builder | builder := MOFormsBuilder new. builder column; center; fill; pref; grow. builder row; center; pref; fill; grow; row; center; fill; pref; grow. builder x: 1 y: 1 add: (MORectangleShape new text: aBlock). builder x: 1 y: 2 add: MORectangleShape new . builder x: 1 y: 2 add: MOChildrenShape new. ^ view shape: builder asShape The semantics are pretty clear in that the children should be in the ChildrenShape area :). _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #3 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 I did not check how umlClass was defined. But let's take a simpler and more concise example. If I have -=-=-=-=-=-=-=-=-=-=-=-= view shape form: [:b | b column; fill; row; fill; row; fill; row; fill. b x:1 y:1 add: (MORectangleShape new width: 80; height: 50). b x:1 y:2 add: (MORectangleShape new width: 80; height: 100). b x:1 y:2 add: (MOChildrenShape new) ]. view node: 'outter node' forIt: [ view shape form: [:b | b column; fill; row; fill; row; fill; row; fill. b x:1 y:1 add: (MORectangleShape new width: 20; height: 30). b x:1 y:2 add: (MORectangleShape new width: 20; height: 50) ]. view node: 'hello world'] -=-=-=-=-=-=-=-=-=-=-=-= The inner node 'hello world' has to be in the (1,2) cell does it? And if I remove "b x:1 y:2 add: (MOChildrenShape new)", then an error will occur because I try to put inner nodes without having a children shape. Is this the expected semantic? _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #4 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 Yes, that is correct :) _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #5 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 Ok, I will work on this today. This is the second day I am away from latex :-) This should be like this for a couple of days more at least :-) _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #6 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 Fixed in version 2.57. I added tests for this situation. Please try. I would like to clean the forms builder and related. I suspect some dead code. There are also methods I would like to cut down into piece. But before doing this, I am waiting for you to intensively test it. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #7 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 Good improvement. It looks good when you have two levels of nodes. However, when you add a third level, it gets confused: | shape builder | builder := MOFormsBuilder new. builder column; fill; row; fill; row; fill; row; fill. builder x:1 y:1 add: (MORectangleShape new text: #printString). builder x:1 y:2 add: (MORectangleShape new). builder x:1 y:2 add: (MOChildrenShape new) . shape := builder asShape. view nodeShape: shape. view nodes: (10 to: 30 by: 10) forEach: [:y | view nodeShape: shape. view nodes: (1 to: 5) forEach: [:each | view nodes: (1 to: each ) forEach: [:x | view nodes: (1 to: x). view verticalLineLayout ]. view verticalLineLayout ]. view verticalLineLayout] It looks like the second level node paints the children twice. Now, try to drag and drop any of the 10, 20 or 30 nodes and you will see that all of these nodes try to paint a second batch of children (although the location of where they get painted varies). _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #8 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 A simpler and less confusing example is: -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= | shape1 builder1 builder2 shape2 | builder1 := MOFormsBuilder new. builder1 column; fill; row; fill; row; fill. builder1 x:1 y:1 add: (MORectangleShape new). builder1 x:1 y:2 add: (MORectangleShape new). builder1 x:1 y:2 add: (MOChildrenShape new) . shape1 := builder1 asShape. view nodeShape: shape1. view nodes: (10 to: 30 by: 10) forEach: [:y | builder2 := MOFormsBuilder new. builder2 column; fill; row; fill; row; fill. builder2 x:1 y:1 add: (MORectangleShape new). builder2 x:1 y:2 add: (MORectangleShape new). builder2 x:1 y:1 add: (MOChildrenShape new) . shape2 := builder2 asShape. view nodeShape: shape2. view node: $a forIt: [ view nodes: (1 to: 2) ]. view verticalLineLayout] -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Sharing the shape should not be a problem, but I prefer to check that later. I am working on this now. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #9 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 Simpler example: | shape1 builder1 builder2 shape2 | builder1 := MOFormsBuilder new. builder1 column; fill; row; fill. builder1 x:1 y:1 add: (MORectangleShape new). builder1 x:1 y:1 add: (MOChildrenShape new) . shape1 := builder1 asShape. view nodeShape: shape1. view nodes: (10 to: 30 by: 10) forEach: [:y | builder2 := MOFormsBuilder new. builder2 column; fill; row; fill. builder2 x:1 y:1 add: (MORectangleShape new). builder2 x:1 y:1 add: (MOChildrenShape new) . shape2 := builder2 asShape. view nodeShape: shape2. view node: $a forIt: [ view nodes: (1 to: 2) ]. view verticalLineLayout] _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #10 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 Version 2.58 fixes the problem I gave in Comment 9. But Comments 8 remains not addressed. I uncovered and fixed a different bug. I am working on your problem. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #11 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 In Mondrian 2.60. There is a remaining small bug about the boundary when you drag and drop inner nodes, I will work on it, but this is not critical for you do test this version. There is several clean I would like to do. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Updates:
Status: Fixed Comment #12 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 Looks much better, but now I found some other strange bugs. I will open other tickets. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Updates:
Status: Accepted Labels: -Priority-Medium -Milestone-4.4 Priority-Critical Milestone-4.6 Comment #13 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 The issue appears again when the nesting is deeper. This is a critical issue. Please take a look. | shape builder | builder := MOFormsBuilder new. builder column; fill; row; fill; row; fill; row; fill. builder x:1 y:1 add: (MORectangleShape new text: #printString). builder x:1 y:2 add: (MORectangleShape new). builder x:1 y:2 add: (MOChildrenShape new) . shape := builder asShape. view nodeShape: shape. view nodes: (100 to: 300 by: 100) forEach: [:x | view nodeShape: shape. view nodes: ((x + 10) to: (x+30) by: 10) forEach: [:y | view nodeShape: shape. view nodes: ((x+y+1) to: (x+y+3)). view verticalLineLayout ]. view verticalLineLayout] _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #14 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 Just in case, the issue got lost in the sea of reports. Alex, please look at this one :) _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #15 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 Yes I will _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Comment #16 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 Now that I am back from my trip, I found the time to work on this bug. This is now fixed (2.118). Doru, if you are happy with my fix, can you close (hopefully for ever :-) this bug? _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Updates:
Status: Fixed Comment #17 on issue 574 by [hidden email]: Nodes with complex shapes do not position the children nodes with complex shapes properly http://code.google.com/p/moose-technology/issues/detail?id=574 Yuppee! :) It looks good. Thanks a lot. _______________________________________________ Moose-dev mailing list [hidden email] https://www.iam.unibe.ch/mailman/listinfo/moose-dev |
Free forum by Nabble | Edit this page |