visjs / vis-network

:dizzy: Display dynamic, automatically organised, customizable network views.
https://visjs.github.io/vis-network/
Apache License 2.0
3k stars 366 forks source link

visjs support edit edge callback both editWithoutDrag and editWithDrag in one instance? #366

Open lmaklmak opened 4 years ago

lmaklmak commented 4 years ago

This was posted by someone else at another github location. https://github.com/almende/vis/issues/4266

I have the same issue that I can't seem to use editWithoutDrag and still be able to drag the to/from endpoints on the GUI. Is this possible? I've scoured the documentation and nowhere does it show a way to do both together. Thanks!

Thomaash commented 4 years ago

Hi @lmaklmak,

I don't know how you imagine this to work. You want to skip reconnecting and not skip it at the same time? Could you provide a use case illustrating this, please?

Thanks.

lmaklmak commented 4 years ago

Hi Thomaash,

When I click on the edge, I have a popup allowing the user to customize an edge property. However, the user also needs to be able to drag the to/from endpoints. So when I hit save on the popup, any property or to/from changes are saved. If they hit cancel, all goes back to the way it was.

Thanks for the prompt reply! Lisa

Thomaash commented 4 years ago

But isn't that exactly how the standard editEdge works? See https://jsfiddle.net/p5jcm2x8/.

PS: Ignore the clutter and irrelevant text around I just tweaked one of the examples.

lmaklmak commented 4 years ago

We want users to be able to see the pop-up without having to drag a to/from point first. They won't always need to change to/from, but will often need to modify edge properties.

Thomaash commented 4 years ago

And are you using the manipulation GUI or something custom?

lmaklmak commented 4 years ago

Yes, we're using the manipulation GUI.