Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to select multiple object/canvas

    I have a page like this.

    A canvas contains several isc.Label.

    The label is scatter everywhere within the canvas as a child of the canvas.
    I can drag, i can resized.

    But how to drag selected labels.. the idea just like on our desktop, we select 2 files.
    then drag and drop it somewhere into other folder..

    i just want to have the pointer selection to select the scatter label just like dragSelection

    So, two things here.

    1. dragSelection (to select) just like on our desktop / folder windows/linux/etc
    2. to drag the selection - drag the selection from 1. to new coordinates.
    Do the smartClient support this?
    Thanks
    Last edited by gtr_ommar; 31 Oct 2010, 18:31.

    #2
    Well - the TileGrid supports something similar - but without the scattered icons. You can see examples of tileGrid drag and drop in the feature explorer.

    If you need to do exactly what you describe, this isn't built in to any SC components, but it wouldn't be hard to achieve with custom drag/drop behavior:

    Essentially you'd need to have the parent (container) canvas have canDrag set to true, dragAppearance "none" and a dragMove handler which updated which children are currently selected (and possibly gave some visual cue like showing and resizing a selection rectangle).

    Then you'd want the individual labels within the parent canvas (the selectable children) to be canDrag and canDrop true, (Possibly with the dragAppearance set to show a custom drag tracker), and have your drop target be 'canAcceptDrop' true. Then you can react to the drop on the drop target via a custom "drop" event handler which checks for which set of labels are currently selected and reacts accordingly.

    Comment

    Working...
    X