kieler / klayjs

(deprecated) KIELER's layout algorithms for JavaScript
Eclipse Public License 1.0
231 stars 22 forks source link

fixed layout option not working #6

Closed iamrakesh closed 8 years ago

iamrakesh commented 8 years ago

If we run layout on json data like below (assume edges have bendpoints as well) { id: 'root', properties: { algorithm: 'de.cau.cs.kieler.fixed' }, children: [ { id: '1', x: 100, y : 25},{id: '2', x: 200, y: 45},{id: '3', x: 200, y: 20} ], edges: [ {source: '1', target: '2'}, {source: '1', target: '3'},{source: '3', target: '2'} ] }

'algorithm' property is not considered and x, y positions for nodes get re-calculated.

Is this property supported for JavaScript version?

To elaborate more, what I am trying is to use klayjs to layout a workflow, and allow user to drag nodes to different position on the browser. At this point I wanted to avoid node position calculation, but want edge bend point calculation only.

is there any other way to achieve this?

le-cds commented 8 years ago

I don't think we ship the fixed layout algorithm with the JavaScript version (my colleague will correct me if I'm wrong there). However, regarding your use case: fixing node positions and only routing edges is actually something we don't support.

uruuru commented 8 years ago

Actually, we do ship the fixed layouter in js. I'll check your example later.

iamrakesh commented 8 years ago

I tried to change one of the example .json files with the fixed layout property, please find the attached sample.

hierarchy-fixed.txt

uruuru commented 8 years ago

You have to explicitly set the layoutHierarchy option to false. Otherwise the klay.layered algorithm is executed right from the start. I'll add that to the documentation.

iamrakesh commented 8 years ago

ok, will check that. any possibility of adding support for only edge routing (old ticket with 'wont fix' status - http://rtsys.informatik.uni-kiel.de/jira/browse/KIPRA-1403)?

uruuru commented 8 years ago

There are no short-term plans to add standalone edge routing. Nevertheless, since it's a frequent request, we may look into it in the future.