OK In progress...

This commit is contained in:
Kolan Sh 2018-01-19 14:00:44 +03:00
parent 7aedf10a4e
commit 014761c393
1 changed files with 6 additions and 4 deletions

View File

@ -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;
}