OK In progress...

This commit is contained in:
Kolan Sh 2018-01-19 14:02:41 +03:00
parent 014761c393
commit e48c8a1f5a
1 changed files with 6 additions and 6 deletions

View File

@ -238,14 +238,14 @@ namespace CairoChart {
} }
var new_zoom = zoom; var new_zoom = zoom;
var rmpx = rect.x - plarea.x; var rmpx = rect.x - plarea.x;
var pzw = zoom.width / plarea.width; var zdpw = zoom.width / plarea.width;
new_zoom.x += rmpx * pzw; new_zoom.x += rmpx * zdpw;
var x_max = zoom.x + (rmpx + rect.width) * pzw; var x_max = zoom.x + (rmpx + rect.width) * zdpw;
new_zoom.width = x_max - new_zoom.x; new_zoom.width = x_max - new_zoom.x;
var rmpy = rect.y - plarea.y; var rmpy = rect.y - plarea.y;
var pzh = zoom.height / plarea.height; var zdph = zoom.height / plarea.height;
new_zoom.y += rmpy * pzh; new_zoom.y += rmpy * zdph;
var y_max = zoom.y + (rmpy + rect.height) * pzh; var y_max = zoom.y + (rmpy + rect.height) * zdph;
new_zoom.height = y_max - new_zoom.y; new_zoom.height = y_max - new_zoom.y;
zoom = new_zoom; zoom = new_zoom;
} }