mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-30 17:25:26 +02:00
New maps in progress... (Works in negative size when resize a element)
This commit is contained in:
parent
3d52c3e842
commit
dc171c45f2
@ -778,18 +778,11 @@ MapController.prototype.resize_node = function(item, handler, delta_x, delta_y)
|
||||
|
||||
var width = item_d3.attr("data-width");
|
||||
var height = item_d3.attr("data-height");
|
||||
|
||||
if (width == null) {
|
||||
width = old_width = item_d3.attr("data-original_width");
|
||||
height = old_height = item_d3.attr("data-original_height");
|
||||
}
|
||||
|
||||
if (width <= 0) {
|
||||
width = Math.abs(width);
|
||||
|
||||
}
|
||||
if (height <= 0) {
|
||||
height = Math.abs(height);
|
||||
}
|
||||
|
||||
old_width = parseFloat(old_width);
|
||||
old_height = parseFloat(old_height);
|
||||
@ -808,6 +801,12 @@ MapController.prototype.resize_node = function(item, handler, delta_x, delta_y)
|
||||
case "S":
|
||||
new_width = width + inc_w;
|
||||
new_height = height + inc_h;
|
||||
if (new_width < 0) {
|
||||
new_width = Math.abs(new_width);
|
||||
}
|
||||
if (new_height < 0) {
|
||||
new_height = Math.abs(new_height);
|
||||
}
|
||||
break;
|
||||
case "N":
|
||||
case "NE":
|
||||
|
Loading…
x
Reference in New Issue
Block a user