From 322a8d5da4ba08275ee9cada47506b1405eb8351 Mon Sep 17 00:00:00 2001 From: "olau@iola.dk" Date: Mon, 13 Jul 2009 12:04:09 +0000 Subject: [PATCH] Swap y axis coordinates to fix bug git-svn-id: https://flot.googlecode.com/svn/trunk@194 1e0a6537-2640-0410-bfb7-f154510ff394 --- jquery.flot.image.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jquery.flot.image.js b/jquery.flot.image.js index 2e7430c..9ca92b6 100644 --- a/jquery.flot.image.js +++ b/jquery.flot.image.js @@ -166,15 +166,15 @@ images (like Google Maps). } if (y1 < yaxis.min) { - sy1 += (sy2 - sy1) * (yaxis.min - y1) / (y2 - y1); + sy2 += (sy1 - sy2) * (yaxis.min - y1) / (y2 - y1); y1 = yaxis.min; } if (y2 > yaxis.max) { - sy2 += (sy2 - sy1) * (yaxis.max - y2) / (y2 - y1); + sy1 += (sy1 - sy2) * (yaxis.max - y2) / (y2 - y1); y2 = yaxis.max; } - + x1 = xaxis.p2c(x1); x2 = xaxis.p2c(x2); y1 = yaxis.p2c(y1);