In JointJs, how can I move a all elements together by dragging an embedded element?
问题 I'm using JointJs to create a diagram. When I create an element with a number of embedded elements, I can easily drag them all by dragging the parent. However, when I drag the children, they move on their own. How can I move the parent and all children by dragging either the parent or one of the children elements? 回答1: it's a little bit tricky: https://jsfiddle.net/vtalas/xk73L947/ the magic is in this part: paper.on('cell:pointermove', function (cellView, evt) { if (cellView.model.isLink())