Moveable: Connecting two objects

Created on 26 Jul 2019  路  10Comments  路  Source: daybrush/moveable

How to connect or link two objects? For example rete.js.org

Feature question

Most helpful comment

@monsterooo
I think that's a group function.

Maybe I'll try to make it this week or next week.

@kethan
Is that what you think is the same as that?

@daybrush

Can I combine multiple elements for dragging?

I made a patch method

image

I have a moveable nested inside element A and element B.

When I manipulate the moveable, I change the element A and the element B.

If you can provide a combined parameter, I think that's awesome.

All 10 comments

@kethan
Hi. First of all, thank you for question.
But, i don't know what you mean.

Did you mean the group?

I mean having link to two objects

@kethan

Do you think link is like this?
https://codepen.io/daybrush/pen/pMeMxP

Thanks for your efforts. I actually meant like this.
https://codepen.io/Ni55aN/pen/xzgQYq

Check number - > number connection

@daybrush

Can I combine multiple elements for dragging?

I made a patch method

image

I have a moveable nested inside element A and element B.

When I manipulate the moveable, I change the element A and the element B.

If you can provide a combined parameter, I think that's awesome.

@monsterooo
I think that's a group function.

Maybe I'll try to make it this week or next week.

@kethan
Is that what you think is the same as that?

@daybrush

Can I combine multiple elements for dragging?

I made a patch method

image

I have a moveable nested inside element A and element B.

When I manipulate the moveable, I change the element A and the element B.

If you can provide a combined parameter, I think that's awesome.

No. I wanted to create a curve to connect two objects.

Perhaps the function of providing a line connecting two objects is not possible.
However, you can know the position using drag.
```js
let left1 = 0;
let top1 = 0;
let left2 = 0;
let top2 = 0;

this.moveable1.on("drag", ({ left, top }) => {
left1 = left;
top1 = top;
link(left1, top1, left2, top2);
});
this.moveable2.on("drag", ({ left, top }) => {
left2 = left;
top2 = top;
link(left1, top1, left2, top2);
});
``

Hi @kethan did you end up getting this working?

Now

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wassgha picture wassgha  路  6Comments

jameschetwood picture jameschetwood  路  6Comments

copthuy picture copthuy  路  4Comments

tesmem101 picture tesmem101  路  3Comments

jiseopX picture jiseopX  路  4Comments