New maps in progress... (Fixing arrow position)
This commit is contained in:
parent
c75929d840
commit
ab1d7f99fc
|
@ -259,6 +259,22 @@ $this->nodes = json_decode('[
|
|||
{
|
||||
"graph_id": 403,
|
||||
"type": 2
|
||||
},
|
||||
{
|
||||
"graph_id": 404,
|
||||
"type": 2
|
||||
},
|
||||
{
|
||||
"graph_id": 405,
|
||||
"type": 2
|
||||
},
|
||||
{
|
||||
"graph_id": 406,
|
||||
"type": 2
|
||||
},
|
||||
{
|
||||
"graph_id": 407,
|
||||
"type": 2
|
||||
}
|
||||
]', true);
|
||||
|
||||
|
@ -268,16 +284,28 @@ $this->edges = json_decode(
|
|||
{"to":"216","from":"214","graph_id":401},
|
||||
{"to":"217","from":"214","graph_id":402},
|
||||
{"to":"218","from":"214","graph_id":403}
|
||||
|
||||
]', true);
|
||||
|
||||
$this->edges = json_decode(
|
||||
'[
|
||||
{"to":"218","from":"214","graph_id":400},
|
||||
{"to":"217","from":"214","graph_id":401},
|
||||
{"to":"216","from":"214","graph_id":402},
|
||||
{"to":"215","from":"214","graph_id":403}
|
||||
{"to":"219","from":"214","graph_id":404},
|
||||
{"to":"220","from":"214","graph_id":405},
|
||||
{"to":"221","from":"214","graph_id":406},
|
||||
{"to":"222","from":"214","graph_id":407}
|
||||
]', true);
|
||||
|
||||
$this->edges = json_decode(
|
||||
'[
|
||||
{"to":"215","from":"214","graph_id":400},
|
||||
{"to":"216","from":"214","graph_id":401},
|
||||
{"to":"217","from":"214","graph_id":402},
|
||||
{"to":"218","from":"214","graph_id":403},
|
||||
{"to":"219","from":"214","graph_id":404},
|
||||
{"to":"220","from":"214","graph_id":405},
|
||||
{"to":"221","from":"214","graph_id":406},
|
||||
{"to":"222","from":"214","graph_id":407}
|
||||
]', true);
|
||||
|
||||
//~ $this->edges = json_decode('[{"to":"165","from":"166","graph_id":208}]', true);
|
||||
|
||||
|
||||
|
|
|
@ -424,6 +424,12 @@ function arrow_by_pieces(target, id_arrow, id_node_to, id_node_from, wait) {
|
|||
transform.rotate = get_angle_of_line(c_elem1, c_elem2) +
|
||||
" 0 " + (arrow_body_height / 2);
|
||||
}
|
||||
else {
|
||||
transform.translate[0] = c_elem1[0];
|
||||
transform.translate[1] = c_elem1[1] - (arrow_body_height/2);
|
||||
transform.rotate = get_angle_of_line(c_elem1, c_elem2) +
|
||||
" 0 " + (arrow_body_height / 2);
|
||||
}
|
||||
arrow_layout.attr("transform", transform.toString());
|
||||
|
||||
/*---------------------------------------------*/
|
||||
|
|
Loading…
Reference in New Issue