displaced edges in the new version of Roassal

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

displaced edges in the new version of Roassal

Usman Bhatti
Hello,

I am having trouble with the new version of Roassal (downloaded with latest moose version today), the edges are abnormally displaced (c.f: attached figure).
Here is the script to generate the visu.

|mainNode view title childNodes ab mainTitle|

view := ROView new.
mainNode := (ROElement spriteOn: 'A Test Node') + ROBorder.
mainTitle :=  (ROLabelElement on: 'A Test Node') textColor: Color gray.
ab := Array with: 'Moose' with: 'Mondrian' with: 'Glamour'.
childNodes := OrderedCollection new.
ab do:
[:each |
element := ((ROElement spriteOn: each) + ROBorder).
title := (ROLabelElement on: each) textColor: Color red.
box := ROBox new color: Color transparent.
element addInteraction: RODraggable.
('Mondrian' matches: each) ifTrue: [box color: Color lightBlue].
('Glamour' matches: each) ifTrue: [box color: Color blue].
element add: title; addShape: box.
childNodes add: element.
].
view add: (ROEdge arrowedLineFrom: childNodes first to: childNodes second) + ROLine blue.
view add: (ROEdge arrowedLineFrom: childNodes first to: childNodes third) + ROLine blue.
view add: (ROEdge arrowedLineFrom: childNodes second to: childNodes third) + ROLine blue.
mainNode addAll: (ROGridLayout on: childNodes).
view addAll: (ROVerticalLineLayout on: (Array with: mainTitle with: mainNode)).
view open

Should I open a bug entry?

thanx
Usman
Inline image 1

_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: displaced edges in the new version of Roassal

abergel
Hi Usman,

No need to report the bug. I fixed it today already :-)

Here is better version of your script:
-=-=-=-=-=-=-=-=
        view := ROView new.
        mainNode := (ROElement spriteOn: 'A Test Node') + ROBorder.
        mainTitle :=  (ROLabelElement on: 'A Test Node') textColor: Color gray.
        ab := Array with: 'Moose' with: 'Mondrian' with: 'Glamour'.
        childNodes := OrderedCollection new.
        ab do:
                [:each |
                        element := ((ROElement spriteOn: each) + ROBorder).
                        title := (ROLabelElement on: each) textColor: Color red.
                        box := ROBox new color: Color transparent.
                        ('Mondrian' matches: each) ifTrue: [box color: Color lightBlue].
                        ('Glamour' matches: each) ifTrue: [box color: Color blue].
                        element add: title; addShape: box.
                        childNodes add: element.
                ].
        view add: ((ROEdge from: childNodes first to: childNodes second) + ROArrowedLine blue) .
        view add: (ROEdge from: childNodes first to: childNodes third) + ROArrowedLine blue.
        view add: (ROEdge from: childNodes second to: childNodes third) + ROArrowedLine blue.
        mainNode addAll: (ROGridLayout on: childNodes).
        view addAll: (ROVerticalLineLayout on: (Array with: mainTitle with: mainNode)).
        view open
-=-=-=-=-=-=-=-=

No need to have "element addInteraction: RODraggable." since a "sprite" is already draggable.

Cheers,
Alexandre

On Jun 3, 2012, at 5:21 PM, Usman Bhatti wrote:

> Hello,
>
> I am having trouble with the new version of Roassal (downloaded with latest moose version today), the edges are abnormally displaced (c.f: attached figure).
> Here is the script to generate the visu.
>
> |mainNode view title childNodes ab mainTitle|
>
> view := ROView new.
> mainNode := (ROElement spriteOn: 'A Test Node') + ROBorder.
> mainTitle :=  (ROLabelElement on: 'A Test Node') textColor: Color gray.
> ab := Array with: 'Moose' with: 'Mondrian' with: 'Glamour'.
> childNodes := OrderedCollection new.
> ab do:
> [:each |
> element := ((ROElement spriteOn: each) + ROBorder).
> title := (ROLabelElement on: each) textColor: Color red.
> box := ROBox new color: Color transparent.
> element addInteraction: RODraggable.
> ('Mondrian' matches: each) ifTrue: [box color: Color lightBlue].
> ('Glamour' matches: each) ifTrue: [box color: Color blue].
> element add: title; addShape: box.
> childNodes add: element.
> ].
> view add: (ROEdge arrowedLineFrom: childNodes first to: childNodes second) + ROLine blue.
> view add: (ROEdge arrowedLineFrom: childNodes first to: childNodes third) + ROLine blue.
> view add: (ROEdge arrowedLineFrom: childNodes second to: childNodes third) + ROLine blue.
> mainNode addAll: (ROGridLayout on: childNodes).
> view addAll: (ROVerticalLineLayout on: (Array with: mainTitle with: mainNode)).
> view open
>
> Should I open a bug entry?
>
> thanx
> Usman
> <Screen shot 2012-06-03 at 5.10.47 PM.png>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
Reply | Threaded
Open this post in threaded view
|

Re: displaced edges in the new version of Roassal

Usman Bhatti
Thanx Alex,
Its corrected now.
And its much better now with edges emerging/originating from the borders of the shapes instead of the middle of the shape.

regards,
Usman


On Mon, Jun 4, 2012 at 12:58 AM, Alexandre Bergel <[hidden email]> wrote:
Hi Usman,

No need to report the bug. I fixed it today already :-)

Here is better version of your script:
-=-=-=-=-=-=-=-=
       view := ROView new.
       mainNode := (ROElement spriteOn: 'A Test Node') + ROBorder.
       mainTitle :=  (ROLabelElement on: 'A Test Node') textColor: Color gray.
       ab := Array with: 'Moose' with: 'Mondrian' with: 'Glamour'.
       childNodes := OrderedCollection new.
       ab do:
               [:each |
                       element := ((ROElement spriteOn: each) + ROBorder).
                       title := (ROLabelElement on: each) textColor: Color red.
                       box := ROBox new color: Color transparent.
                       ('Mondrian' matches: each) ifTrue: [box color: Color lightBlue].
                       ('Glamour' matches: each) ifTrue: [box color: Color blue].
                       element add: title; addShape: box.
                       childNodes add: element.
               ].
       view add: ((ROEdge from: childNodes first to: childNodes second) + ROArrowedLine blue) .
       view add: (ROEdge from: childNodes first to: childNodes third) + ROArrowedLine blue.
       view add: (ROEdge from: childNodes second to: childNodes third) + ROArrowedLine blue.
       mainNode addAll: (ROGridLayout on: childNodes).
       view addAll: (ROVerticalLineLayout on: (Array with: mainTitle with: mainNode)).
       view open
-=-=-=-=-=-=-=-=

No need to have "element addInteraction: RODraggable." since a "sprite" is already draggable.

Cheers,
Alexandre

On Jun 3, 2012, at 5:21 PM, Usman Bhatti wrote:

> Hello,
>
> I am having trouble with the new version of Roassal (downloaded with latest moose version today), the edges are abnormally displaced (c.f: attached figure).
> Here is the script to generate the visu.
>
> |mainNode view title childNodes ab mainTitle|
>
>       view := ROView new.
>       mainNode := (ROElement spriteOn: 'A Test Node') + ROBorder.
>       mainTitle :=  (ROLabelElement on: 'A Test Node') textColor: Color gray.
>       ab := Array with: 'Moose' with: 'Mondrian' with: 'Glamour'.
>       childNodes := OrderedCollection new.
>       ab do:
>               [:each |
>                       element := ((ROElement spriteOn: each) + ROBorder).
>                       title := (ROLabelElement on: each) textColor: Color red.
>                       box := ROBox new color: Color transparent.
>                       element addInteraction: RODraggable.
>                       ('Mondrian' matches: each) ifTrue: [box color: Color lightBlue].
>                       ('Glamour' matches: each) ifTrue: [box color: Color blue].
>                       element add: title; addShape: box.
>                       childNodes add: element.
>               ].
>       view add: (ROEdge arrowedLineFrom: childNodes first to: childNodes second) + ROLine blue.
>       view add: (ROEdge arrowedLineFrom: childNodes first to: childNodes third) + ROLine blue.
>       view add: (ROEdge arrowedLineFrom: childNodes second to: childNodes third) + ROLine blue.
>       mainNode addAll: (ROGridLayout on: childNodes).
>       view addAll: (ROVerticalLineLayout on: (Array with: mainTitle with: mainNode)).
>       view open
>
> Should I open a bug entry?
>
> thanx
> Usman
> <Screen shot 2012-06-03 at 5.10.47 PM.png>
> _______________________________________________
> Moose-dev mailing list
> [hidden email]
> https://www.iam.unibe.ch/mailman/listinfo/moose-dev

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.



_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev


_______________________________________________
Moose-dev mailing list
[hidden email]
https://www.iam.unibe.ch/mailman/listinfo/moose-dev