Archi Forum

Archi Plug-ins => jArchi => Topic started by: Xavier Mayeur on May 10, 2022, 15:52:44 PM

Title: jArchi library with functions to manage relationship layout in views
Post by: Xavier Mayeur on May 10, 2022, 15:52:44 PM
For whose who are interested, please find attached a library with functions to manage the layout of the relationships in view:

Link: Gist 'relLib.ajs' (https://gist.github.com/xmayeur/bbe80af3d09706b34848b4bbfaa71103)

Example:

load(__DIR__+'relLib.aj')  // load relLib library

// create L-shaped visual relationships connected to the selected objects(views, elements, relationships)
       doEachRel(lRel)(selection, 0) // start horizontal and create a L-Shape relationship

// create S-shape visual relationships
        doEachRel(sRel)(selection, 1) // start vertically and create a S-shape relationship

// arrange and spread equally multiple visual relationships along the edges of an element
       doEachRel(distributeConnections)(selected_element)

// make all existing visual relationships orthogonal (especially after moving an object in a view)
        doEachRel(ortho)(selection)


Enjoy,

Xavier
Title: Re: jArchi library with functions to manage relationship layout in views
Post by: Phil Beauvoir on May 10, 2022, 16:25:13 PM
Thanks for sharing!

Phil