Working in the drag and drop of arrows.

This commit is contained in:
mdtrooper 2016-03-23 11:35:21 +01:00
parent 37e99d9421
commit c20f8ff465
2 changed files with 3 additions and 11 deletions

View File

@ -819,7 +819,7 @@ MapController.prototype.move_arrow = function (id_from_any_point_arrow) {
var id_node_to = "node_" + d3.select(this).attr("data-to"); var id_node_to = "node_" + d3.select(this).attr("data-to");
var id_node_from = "node_" + d3.select(this).attr("data-from"); var id_node_from = "node_" + d3.select(this).attr("data-from");
self.arrow_by_pieces(self._target + " svg", id_arrow, id_node_to, id_node_from, 0); self.arrow_by_pieces(self._target + " svg", d, 0);
}); });
} }
@ -1670,8 +1670,6 @@ MapController.prototype.nodeData = function(data_id, type, id_map, data_graph_id
MapController.prototype.arrow_by_pieces = function(target, arrow_data, wait) { MapController.prototype.arrow_by_pieces = function(target, arrow_data, wait) {
var self = this; var self = this;
console.log("MapController.arrow_by_pieces", target, arrow_data, wait);
if (typeof(wait) === "undefined") if (typeof(wait) === "undefined")
wait = 1; wait = 1;
@ -1928,4 +1926,3 @@ function get_radius_element(element) {
return Math.sqrt( return Math.sqrt(
Math.pow(size[0] / 2, 2) + Math.pow(size[1] / 2, 2)); Math.pow(size[0] / 2, 2) + Math.pow(size[1] / 2, 2));
} }

View File

@ -387,11 +387,7 @@ NetworkmapController.prototype.paint_arrows = function() {
* This function creates the arrow * This function creates the arrow
*/ */
function create_arrow(arrow_layouts) { function create_arrow(arrow_layouts) {
arrow_layouts.each(function(d) { arrow_layouts.each(function(d) {
console.log("create_arrow", d);
self.arrow_by_pieces(self._target + " svg", d); self.arrow_by_pieces(self._target + " svg", d);
}); });
} }
@ -401,10 +397,9 @@ NetworkmapController.prototype.paint_arrows = function() {
NetworkmapController.prototype.arrow_by_pieces = function (target, arrow_data, wait) { NetworkmapController.prototype.arrow_by_pieces = function (target, arrow_data, wait) {
var self = this; var self = this;
console.log("NetworkmapController.arrow_by_pieces", arrow_data); if (typeof(wait) === "undefined") {
if (typeof(wait) === "undefined")
wait = 1; wait = 1;
}
switch (arrow_data['type']) { switch (arrow_data['type']) {
case 'AA': case 'AA':