mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-28 00:04:37 +02:00
Fixed the resizing element and arrows
This commit is contained in:
parent
1a80e7c10c
commit
3d52c3e842
@ -842,6 +842,9 @@ MapController.prototype.resize_node = function(item, handler, delta_x, delta_y)
|
|||||||
|
|
||||||
item_d3.attr("data-width", parseFloat(new_width));
|
item_d3.attr("data-width", parseFloat(new_width));
|
||||||
item_d3.attr("data-height", parseFloat(new_height));
|
item_d3.attr("data-height", parseFloat(new_height));
|
||||||
|
|
||||||
|
|
||||||
|
self.move_arrow(item["graph_id"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1335,10 +1338,13 @@ function getBBox_Symbol(target, symbol) {
|
|||||||
* This function returns the size of the element
|
* This function returns the size of the element
|
||||||
*/
|
*/
|
||||||
function get_size_element(element) {
|
function get_size_element(element) {
|
||||||
|
var transform = d3.transform(d3.select(element).attr("transform"));
|
||||||
var element_b = d3.select(element).node().getBBox();
|
var element_b = d3.select(element).node().getBBox();
|
||||||
|
|
||||||
|
|
||||||
return [element_b['width'], element_b['height']];
|
return [
|
||||||
|
element_b['width'] * transform.scale[0],
|
||||||
|
element_b['height'] * transform.scale[1]];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
x
Reference in New Issue
Block a user