almende / vis

⚠️ This project is not maintained anymore! Please go to https://github.com/visjs
7.85k stars 1.48k forks source link

Fixed Layout #34

Closed heinzelmannIT closed 10 years ago

heinzelmannIT commented 10 years ago

Hey, I have a question: Do you have an option for a static graph layout? Thanks!

josdejong commented 10 years ago

What do you mean exactly with a static layout? You can give nodes a fixed x and/or y position and that's about it.

We have plans to add hierarchic layouts, though.

AlexDM0 commented 10 years ago

Do you mean static just for the nodes or no dragging and zooming of the canvas as well?

heinzelmannIT commented 10 years ago

I mean static in a way that you can drag the nodes around and they stay where they are dragged, so that there is no force-directed layout or somthing like that. The idea is to use this for a mindmapping/diagramm tool, so it would be helpful if there was an option like this.

AlexDM0 commented 10 years ago

If I turn the physics off, the initialization of the nodes can be very problematic, though it could theoretically be turned off after settling. Do you imagine you'd use this with the data manipulation functionality? This is not directly a use case we have designed for, but we will discuss it in the project meeting next week.

heinzelmannIT commented 10 years ago

Yes, there would be some buttons for adding/deleting/editing nodes. It would be ideal if the nodes would overlap if you moved them on top each other, so a static layout, everything stays where you drag it.

AlexDM0 commented 10 years ago

This sounds like a situation where something like a google drawing might be better suited. In this specific use case I'd imagine an easy label editor, node scaling tool, shape selection and color picker would also be appropriate. While interesting, that is not the direction we plan to take with graph in the near future.

heinzelmannIT commented 10 years ago

Ok, many thanks for your help!