OK In progress...
This commit is contained in:
parent
7aedf10a4e
commit
014761c393
|
@ -238,12 +238,14 @@ namespace CairoChart {
|
|||
}
|
||||
var new_zoom = zoom;
|
||||
var rmpx = rect.x - plarea.x;
|
||||
new_zoom.x += rmpx / plarea.width * zoom.width;
|
||||
var x_max = zoom.x + (rmpx + rect.width) / plarea.width * zoom.width;
|
||||
var pzw = zoom.width / plarea.width;
|
||||
new_zoom.x += rmpx * pzw;
|
||||
var x_max = zoom.x + (rmpx + rect.width) * pzw;
|
||||
new_zoom.width = x_max - new_zoom.x;
|
||||
var rmpy = rect.y - plarea.y;
|
||||
new_zoom.y += rmpy / plarea.height * zoom.height;
|
||||
var y_max = zoom.y + (rmpy + rect.height) / plarea.height * zoom.height;
|
||||
var pzh = zoom.height / plarea.height;
|
||||
new_zoom.y += rmpy * pzh;
|
||||
var y_max = zoom.y + (rmpy + rect.height) * pzh;
|
||||
new_zoom.height = y_max - new_zoom.y;
|
||||
zoom = new_zoom;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue