Slavcho wrote on May 24
th, 2017 at 10:00am:
Here we've ported our AnchorPoints sample project to ASP.NET -
https://mindfusion.eu/_samples/AnchorPoints.ASP.NET.zipNote it defines custom AnchorPattern on both server and client sides; at this time only the pattern ID is JSON-serialized along with nodes so you need the definition on both sides.
Regards,
Slavcho
I create gateway and link from client side, but this code dont work correctly:
var gateway = new DLXShapeNode();
gateway.setBounds(
new MindFusion.Drawing.Rect(
destNode.bounds.right() - 140,
destNode.bounds.center().y - 20,
40,
40)
);
var gatewayAnchorPoints = [new AnchorPoint(50, 0, true, true),
new AnchorPoint(100, 50, true, true),
new AnchorPoint(50, 100, true, true),
new AnchorPoint(0, 50, true, true)];
var gatewayAnchorPattern = new AnchorPattern(gatewayAnchorPoints);
gateway.setAnchorPattern(gatewayAnchorPattern);
gateway.setShapeType(ShapeTypes.InclusiveGateway);
diagram.addItem(gateway);
// get first created destination node link
var destNodeLink = destNode.incomingLinks[1];
destNodeLink.setDestination(gateway);
var connectionLink = new DLXDiagramLink(diagram, gateway, destNode);
diagram.addItem(connectionLink);
destNode.incomingLinks[0].setDestination(gateway);
...