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

Roassal dragging subtrees (feature contribution) #904

Closed
seandenigris opened this issue Aug 3, 2015 · 1 comment
Closed

Roassal dragging subtrees (feature contribution) #904

seandenigris opened this issue Aug 3, 2015 · 1 comment

Comments

@seandenigris
Copy link
Contributor

Originally reported on Google Code with ID 904

With a tree layout, when dragging an element I needed to drag all the children at the
same time.  I knocked up a solution sufficient to my needs in about 40 minutes - see
attached changeset.   I might be a nice general feature to add to Roassal but its a
bit rough. It will likely need some critical love to polish it before integration.
 Later it might be made to work with ROSelection and multi-selected elements - but
that is out of my scope for the moment.

Reported by benjamin.t.coman on 2013-01-26 16:54:49


- _Attachment: [RODraggableWithOthers.2.cs](https://storage.googleapis.com/google-code-attachments/moose-technology/issue-904/comment-0/RODraggableWithOthers.2.cs)_
@seandenigris
Copy link
Contributor Author

Hi Ben,

Thanks for your suggestion. I wrote a contribution inspired from your example.

Fixed in 1.457 of Roassal. Try this:

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| view elements |
view := ROView new.

0 to: 50 by: 10 do: [ :i | 
    elements := (ROBox green size: 10) elementsOn: (i to: i + 9).
    elements do: [ :e | e @ RODraggable @ ROPopup ].
    view addAll: elements.

    ROLine buildEdgesFromElement: elements first from: #yourself toAll: [ :v | (v + 1
to: v + 9) ].

    ROTreeLayout on: elements.

    (view elementFromModel: i) - ROBox + ROBox red.
    (view elementFromModel: i)
        @ ROAllConnectedNodeDraggable ;
        translateBy: i * 15 @ 10.
].

view open
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=

Reported by alexandre.bergel on 2013-10-21 12:36:24

  • Status changed: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant