From dc60f2ea929cbeec222b0d62f6d8a74badcf6189 Mon Sep 17 00:00:00 2001 From: Kolan Sh Date: Tue, 23 Jan 2018 13:40:45 +0300 Subject: [PATCH] OK In progress... --- src/Axis.vala | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/src/Axis.vala b/src/Axis.vala index 5da450f..88e8eae 100644 --- a/src/Axis.vala +++ b/src/Axis.vala @@ -509,20 +509,14 @@ namespace CairoChart { for (int sk = si; sk > sj; --sk) { var s3 = chart.series[sk]; if (!s3.zoom_show) continue; - if (is_x) { - if (Math.coord_cross(s2.axis_x.place.zmin, s2.axis_x.place.zmax, s3.axis_x.place.zmin, s3.axis_x.place.zmax) - || s2.axis_x.position != s3.axis_x.position - || s2.axis_x.dtype != s3.axis_x.dtype) { - has_intersection = true; - break; - } - } else { - if (Math.coord_cross(s2.axis_y.place.zmin, s2.axis_y.place.zmax, s3.axis_y.place.zmin, s3.axis_y.place.zmax) - || s2.axis_y.position != s3.axis_y.position - || s2.axis_y.dtype != s3.axis_y.dtype) { - has_intersection = true; - break; - } + Axis axis2, axis3; + if (is_x) {axis2 = s2.axis_x; axis3 = s3.axis_x; } + else {axis2 = s2.axis_y; axis3 = s3.axis_y; } + if (Math.coord_cross(axis2.place.zmin, axis2.place.zmax, axis3.place.zmin, axis3.place.zmax) + || axis2.position != axis3.position + || axis2.dtype != axis3.dtype) { + has_intersection = true; + break; } } if (!has_intersection) {