Skip to content

Commit

Permalink
adg: take the absolute value when computing sizes
Browse files Browse the repository at this point in the history
Factors can be negatives, e.g. when the local map switches the drawing
on the X or Y axis.
  • Loading branch information
ntd committed Jul 20, 2017
1 parent 8ee5f38 commit 9500f90
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/adg/adg-ldim.c
Expand Up @@ -878,8 +878,8 @@ _adg_choose_flags(AdgLDim *ldim, gboolean *to_outside, gboolean *to_detach)
data = ldim->data;
local = adg_entity_get_local_matrix((AdgEntity *) ldim);
global = adg_entity_get_global_matrix((AdgEntity *) ldim);
local_factor = (local->xx + local->yy) / 2;
global_factor = (global->xx + global->yy) / 2;
local_factor = abs(local->xx + local->yy) / 2;
global_factor = abs(global->xx + global->yy) / 2;
available_space = data->geometry.distance * local_factor * global_factor;

markers_space = 0;
Expand Down

0 comments on commit 9500f90

Please sign in to comment.