From e0daabd2dd2cc3272728806a6b926baba15b85e1 Mon Sep 17 00:00:00 2001 From: Jani Pehkonen Date: Tue, 10 Mar 2020 19:09:15 +0200 Subject: [PATCH] Magnifier positioning in reftest analyzer When reftest analyzer shows magnified pixels, there is a seemingly random offset between the mouse position and the magnified position. The reason for this is that reftest analyzer assumes all images have 800 * 1000 pixels but actually the test images have varying sizes. --- test/resources/reftest-analyzer.html | 2 +- test/resources/reftest-analyzer.js | 16 +++++++++++----- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/test/resources/reftest-analyzer.html b/test/resources/reftest-analyzer.html index a3e5b030d..2836f6860 100644 --- a/test/resources/reftest-analyzer.html +++ b/test/resources/reftest-analyzer.html @@ -104,7 +104,7 @@ Original author: L. David Baron Circle differences - + = 800 || py >= 1000) { + if (px < 0 || py < 0 || px >= gImage1Data.width || py >= gImage1Data.height) { p1.setAttribute("fill", "#aaa"); p2.setAttribute("fill", "#888"); } else {