How to select multi node by drag or ctrl

34 views
Skip to first unread message

manh ninh duc

unread,
May 16, 2022, 11:15:42 PM5/16/22
to JointJS
Hi there, I have 3 rect and i want  to drag to chose multi by right mouse or by press ctrl  How can i do it ?

manh ninh duc

unread,
May 16, 2022, 11:37:09 PM5/16/22
to JointJS
i sorry by press shift like in the demo


Vào lúc 10:15:42 UTC+7 ngày Thứ Ba, 17 tháng 5, 2022, manh ninh duc đã viết:

Marcin Wanago

unread,
May 18, 2022, 10:37:27 AM5/18/22
to JointJS
Hi,
You need to use `keyboard.isActive` and  `selection.startSelecting`.

```
paper.on('blank:pointerdown', (event: dia.Event) => {
  if (keyboard.isActive('shift', event)) {
    selection.startSelecting(event);
  } else {
    selection.collection.reset([]);
  }
});
```
https://resources.jointjs.com/docs/rappid/v3.5/ui.Selection.html

Marek Hozák

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

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
Reply all
Reply to author
Forward
0 new messages