zomm area in graphs: if dragging backward (in x direction) reverse x axis.
This commit is contained in:
parent
c7501d4a28
commit
02c1dce486
|
|
@ -189,7 +189,7 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int
|
|||
Graph_ctx *gr;
|
||||
const char *val;
|
||||
int i, need_all_redraw = 0, need_redraw = 0, dataset = 0;
|
||||
double xx1, xx2, yy1, yy2, tmp;
|
||||
double xx1, xx2, yy1, yy2;
|
||||
double delta_threshold = 0.25;
|
||||
double zoom_m = 0.5;
|
||||
int save_mouse_at_end = 0, clear_graphpan_at_end = 0;
|
||||
|
|
@ -343,7 +343,7 @@ static int waves_callback(int event, int mx, int my, KeySym key, int button, int
|
|||
/* parameters for zoom area by mouse drag */
|
||||
xx1 = G_X(xctx->mx_double_save);
|
||||
xx2 = G_X(xctx->mousex_snap);
|
||||
if(xx2 < xx1) { tmp = xx1; xx1 = xx2; xx2 = tmp; }
|
||||
/* if(xx2 < xx1) { double tmp; tmp = xx1; xx1 = xx2; xx2 = tmp; } */
|
||||
if(xx1 == xx2) xx2 += 1e-6;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -2611,8 +2611,8 @@ int find_closest_wave(int i, Graph_ctx *gr)
|
|||
closest_dataset = sweepvar_wrap;
|
||||
}
|
||||
}
|
||||
dbg(1, "find_closest_wave(): xval=%g yval=%g xx=%g yy=%g sweepvar_wrap=%d ntok=%s\n",
|
||||
xval, yval, xx, yy, sweepvar_wrap, ntok);
|
||||
dbg(1, "find_closest_wave(): xval=%g yval=%g xx=%g yy=%g sweepvar_wrap=%d ntok=%s stok=%s\n",
|
||||
xval, yval, xx, yy, sweepvar_wrap, ntok, stok? stok : "<NULL>");
|
||||
}
|
||||
last = p;
|
||||
cnt++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue