New maps in progress... (Document the code)
This commit is contained in:
parent
62f4c058f4
commit
ddbc922fad
|
@ -267,6 +267,11 @@ MapController.prototype.get_edges_from_node = function(id_graph) {
|
|||
return return_edges;
|
||||
}
|
||||
|
||||
/**
|
||||
* Function get_arrow_from_id
|
||||
* Return void
|
||||
* This function return an arrow from a specific id
|
||||
*/
|
||||
MapController.prototype.get_arrow_from_id = function(id) {
|
||||
var self = this;
|
||||
|
||||
|
@ -288,6 +293,11 @@ MapController.prototype.get_arrow_from_id = function(id) {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Function get_arrows_from_edges
|
||||
* Return array[]
|
||||
* This function returns a collection of arrows from edges (array)
|
||||
*/
|
||||
MapController.prototype.get_arrows_from_edges = function() {
|
||||
var self = this;
|
||||
|
||||
|
@ -777,9 +787,6 @@ MapController.prototype.paint_nodes = function() {
|
|||
.attr("data-id", function(d) { return d['id'];})
|
||||
.attr("data-graph_id", function(d) { return d['graph_id'];})
|
||||
.attr("data-type", function(d) { return d['type'];})
|
||||
//~ .append("circle")
|
||||
//~ .attr("style", "fill: rgb(50, 50, 128);")
|
||||
//~ .attr("r", "15");
|
||||
.append("rect")
|
||||
.attr("style", "fill: rgb(50, 50, 128);")
|
||||
.attr("x", 0)
|
||||
|
|
|
@ -232,6 +232,11 @@ NetworkmapController.prototype.get_arrows_AMA = function(id_to, id_from) {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Function get_arrow_AA
|
||||
* Return array (arrow)
|
||||
* This function returns an AA arrow
|
||||
*/
|
||||
NetworkmapController.prototype.get_arrow_AA = function(id_to, id_from) {
|
||||
var self = this;
|
||||
var arrow_AA;
|
||||
|
@ -284,7 +289,6 @@ NetworkmapController.prototype.exists_arrow = function(arrows, arrow) {
|
|||
return true; // Continue
|
||||
}
|
||||
|
||||
|
||||
if (a['type'] == arrow['type']) {
|
||||
|
||||
var a_to = a['to']['graph_id'];
|
||||
|
@ -357,8 +361,6 @@ NetworkmapController.prototype.paint_arrows = function() {
|
|||
}
|
||||
});
|
||||
|
||||
console.log(clean_arrows);
|
||||
|
||||
//TO DO
|
||||
var arrow_layouts = self._viewport.selectAll(".arrow")
|
||||
.data(clean_arrows)
|
||||
|
@ -387,7 +389,6 @@ NetworkmapController.prototype.paint_arrows = function() {
|
|||
function create_arrow(arrow_layouts) {
|
||||
|
||||
arrow_layouts.each(function(d) {
|
||||
console.log(d['type']);
|
||||
switch (d['type']) {
|
||||
case 'AA':
|
||||
arrow_by_pieces(self._target + " svg",
|
||||
|
@ -585,11 +586,6 @@ function arrow_by_pieces_AMMA(target, arrow_data, wait) {
|
|||
/*---------------------------------------------*/
|
||||
/*-------- Resize the body arrow width --------*/
|
||||
/*---------------------------------------------*/
|
||||
//~ var arrow_head = arrow_layout.select(".head");
|
||||
//~ var arrow_head_b = arrow_head.node().getBBox();
|
||||
//~ var arrow_head_height = (arrow_head_b['height'] + arrow_head_b['y']);
|
||||
//~ var arrow_head_width = (arrow_head_b['width'] + arrow_head_b['x']);
|
||||
|
||||
arrow_head_width = 0; //WIP
|
||||
|
||||
var body_width = distance - arrow_head_width - radius_to - radius_from;
|
||||
|
|
Loading…
Reference in New Issue