To be able to interactively create nodes and links on
the client side, import the following scripts:
<script TYPE="text/javascript" src="script/IlvAbstractSelectionManager.js">
</script>
<script TYPE="text/javascript" src="script/framework/IlvSelectionManager.js">
</script>
<script TYPE="text/javascript" src="script/framework/IlvMakeObjectInteractor.js"></script>
The interactor can be instantiated, configured and set
as follows:
var interactor = new IlvMakeObjectInteractor();
// optionally make it a link interactor
interactor.setLinkMode(true);
// mandatory, set the tag of the created object in the diagrammer model
interactor.setAdditionalParameters("tagname");
view.setInteractor(interactor);
In addition to the tag name, the interactor can be configured
to set some initial properties on the selected object at creation
time:
var properties = {propertyName1: "propertyValue1",
propertyName2: "propertyValue2"};
interactor.setProperties(properties);