Dragging multiple selected elements

265 views
Skip to first unread message

Marcin Wanago

unread,
May 18, 2022, 10:35:24 AM5/18/22
to JointJS
Hi,
I'm using JointJS and Rappid 3.5. I'm trying to implement selecting multiple elements in a similar way as in Kitchen sink.
https://resources.jointjs.com/demos/kitchensink
I didn't have any issue with implementing selecting multiple elements following the source code of Kitchen sink.

When I drag one of the selected elements to change the position, it drags just one element instead all of the selected elements. Is there some configuration I have to use to make it drag the whole selection?

Cheers,
Marcin

Marcin Wanago

unread,
May 18, 2022, 10:51:58 AM5/18/22
to JointJS
Looks like dragging all selected elements should be the default behavior, am I right?

Marek Hozák

unread,
May 18, 2022, 5:05:42 PM5/18/22
to JointJS
Hi Marcin,

Thank you for getting in touch! We've just moved our support to Github, where we answer all questions, exchange ideas for improving JointJS and JointJS+, and share news and updates.

To help us resolve your question, please post your question in the Github discussion. We promise to get back to you asap. 🙂
  1. Select Q&A from the categories
  2. Click on the "New Discussion" button to ask your question
  3. Expect our reply
Thank you for understanding and for being part of our community! 🙂 

Marek from JointJS

manh ninh duc

unread,
May 18, 2022, 10:12:25 PM5/18/22
to JointJS
i have a same problem like you so if you know the answer please share the code

Vào lúc 21:51:58 UTC+7 ngày Thứ Tư, 18 tháng 5, 2022, mar...@wanago.io đã viết:

manh ninh duc

unread,
May 19, 2022, 12:19:42 AM5/19/22
to JointJS
Hi,
I just fix the problem by delete 1 css in css file i get from the souce code demo dynamic-stencil https://resources.jointjs.com/demos/dynamic-stencil
  .selection-box {
    opacity: 0.3;
    /* pointer-events: none; */ is was this line 
}
and set allowTranslate to true , I hope that could help you 

Vào lúc 21:51:58 UTC+7 ngày Thứ Tư, 18 tháng 5, 2022, mar...@wanago.io đã viết:
Looks like dragging all selected elements should be the default behavior, am I right?

Marcin Wanago

unread,
May 19, 2022, 6:58:18 AM5/19/22
to JointJS
Thank you, I will ask next questions in the Github discussions.
When it comes to "pointer-events: none", that's brilliant, thank you!

I was using it fix another issue I was having.
I have shapes that look very similar to the question blocks in the above demo. When I selected a shape, the selection block was preventing me from using the left half of the ports to drag a link. I will need to fix this problem in a different way than with using "pointer-events: none" on the ".selection-box". You've helped me a lot, though.

Screenshot from 2022-05-19 12-56-34.png
Reply all
Reply to author
Forward
0 new messages