Commit 2b83a28d authored by Jérome Perrin's avatar Jérome Perrin

GUI: a failed attempt at making buffer shaped like triangles

parent 69335758
...@@ -365,12 +365,13 @@ ...@@ -365,12 +365,13 @@
edge_data.jsplumb_destination_endpoint], edge_data.jsplumb_destination_endpoint],
overlays: overlays overlays: overlays
}); });
} else { } else {
connection = gadget.props.jsplumb_instance.connect({ connection = gadget.props.jsplumb_instance.connect({
source: gadget.props.node_id_to_dom_element_id[edge_data.source], source: gadget.props.node_id_to_dom_element_id[edge_data.source],
target: gadget.props.node_id_to_dom_element_id[edge_data.destination], target: gadget.props.node_id_to_dom_element_id[edge_data.destination],
Connector: [ "Bezier", {curviness: 75} ], Connector: [ "Bezier", {curviness: 75} ],
overlays: overlays overlays: overlays,
endpoint: "Dot"
}); });
} }
...@@ -764,21 +765,28 @@ ...@@ -764,21 +765,28 @@
// Add some flowchart endpoints // Add some flowchart endpoints
// TODO: add them all ! // TODO: add them all !
gadget.props.jsplumb_instance.addEndpoint(dom_element_id, { if (!class_definition.shape) {
isSource:true, gadget.props.jsplumb_instance.addEndpoint(dom_element_id, {
maxConnections:-1, isSource:true,
connector:[ "Flowchart", { stub:[40, 60], maxConnections:-1,
gap:10, connector:[ "Flowchart", { stub:[40, 60],
cornerRadius:5, gap:10,
alwaysRespectStubs:true } ] cornerRadius:5,
}, { anchor: "BottomCenter", alwaysRespectStubs:true } ]
uuid: node_id + ".flowchartBottomCenter" }); }, { anchor: "BottomCenter", uuid: node_id + ".flowchartBottomCenter" });
gadget.props.jsplumb_instance.addEndpoint(dom_element_id, gadget.props.jsplumb_instance.addEndpoint(dom_element_id,
{ isTarget:true, maxConnections: -1 }, { isTarget:true, maxConnections: -1 },
{ anchor: "LeftMiddle", uuid: node_id + ".flowChartLeftMiddle" }); { anchor: "LeftMiddle", uuid: node_id + ".flowChartLeftMiddle" });
}
else {
console.log("shape :)");
gadget.props.jsplumb_instance.addEndpoint(dom_element_id,
{
endpoint:"Dot",
anchor:[ "Perimeter", { shape:"Triangle" }]
});
}
gadget.notifyDataChanged(); gadget.notifyDataChanged();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment