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

GUI: a failed attempt at making buffer shaped like triangles

parent 69335758
...@@ -370,7 +370,8 @@ ...@@ -370,7 +370,8 @@
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,6 +765,7 @@ ...@@ -764,6 +765,7 @@
// Add some flowchart endpoints // Add some flowchart endpoints
// TODO: add them all ! // TODO: add them all !
if (!class_definition.shape) {
gadget.props.jsplumb_instance.addEndpoint(dom_element_id, { gadget.props.jsplumb_instance.addEndpoint(dom_element_id, {
isSource:true, isSource:true,
maxConnections:-1, maxConnections:-1,
...@@ -771,14 +773,20 @@ ...@@ -771,14 +773,20 @@
gap:10, gap:10,
cornerRadius:5, cornerRadius:5,
alwaysRespectStubs:true } ] alwaysRespectStubs:true } ]
}, { anchor: "BottomCenter", }, { anchor: "BottomCenter", uuid: node_id + ".flowchartBottomCenter" });
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