moveable icon indicating copy to clipboard operation
moveable copied to clipboard

Feature request -- Multiple elements get the total width and height position

Open kechen123 opened this issue 3 years ago • 4 comments

Hi @ dayrush. When i select multiple elements, several of them are a group. I need to add a border for the group. I need to provide a method to calculate the total width, height, and location of multiple elements, such as an active area. Maybe "movable" can achieve this function. image

kechen123 avatar Nov 22 '21 03:11 kechen123

@kechen123

Ooh, that feature doesn't exist yet. But it seems possible.

If my understanding is correct, I'm going to make an example like this:

<Moveable
    target={[target1, target2, target3, target4]}
    groups={[
         [target1, target2, target3],
    ]} />

Please comment.

daybrush avatar Nov 22 '21 19:11 daybrush

@daybrush You understand correctly,

If "movable" has this function, it's exciting.

Group nesting can be considered

kechen123 avatar Nov 23 '21 01:11 kechen123

@kechen123

Moveable's new version is released.

Support Multiple Groups. [0, 1, 2] is single group. [[0, 1], 2] is multiple group.

target={[[0, 1], 2]}

daybrush avatar Sep 15 '22 18:09 daybrush

See demos:

https://daybrush.com/moveable/storybook2/?path=/story/group--multiple-group

Multiple Group with Selecto

https://daybrush.com/moveable/storybook2/?path=/story/combination-with-other-components--use-selecto-with-multiple-group

daybrush avatar Sep 15 '22 18:09 daybrush