|| | |
|Browse by category
How to create and interact with multi-points links in my Diagrammer application?
IlvMakeSDMLinkInteractor will store the model property "intermediateLinkPoints" for the link while committing the new link to the model. When the link is rerendered, the new CSS rule makes sure that this model property is respected.
Note that creating points of links interactively makes sense only if graph layout and link layout are disabled. This will ensure the links will not be reshaped by the layout..
Interaction with Multi-Points Links
By default, SDM only supports interaction with links in a straight line mode.
You cannot modify the link (intermediate) points interactively after creation.
To be able to interact with intermediate points of links, you need to set an
IlvPolyPointsEdition object interactor on the links.
A basic way to enable a polypoint interaction is to reset the usual selection handles by disabling the highlighting selection flag from SDM.
However, the default polypoint interactor will only update the link 'visually' and won't commit any changes to the model.
To avoid this behavior:
Note that using this custom polypoint interactor,
- Ctrl+Click on a intermediate point's link removes the point.
- Ctrl+Click on the link will add a point at the given mouse location.
You can download this sample MultiPointLinks.zip which illustrates both creation and interaction features.
Note: In order to run this sample with JViews 8.7 and later, you must call the ilog.views.util.IlvProductUtil.DeploymentLicenseRequired method with the appropriate argument. See the General information > Deployment licenses > Declaring the use of IBM ILOG JViews services section in the documentation for more information.