From e5ace5ecffcc1d2a514168d7ae73965080abe87b Mon Sep 17 00:00:00 2001 From: James Cryer Date: Tue, 17 Sep 2013 10:52:22 +0100 Subject: [PATCH] Aways calculate dimension difference so that client doesn't not need to guard against undefined object. --- resemble.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/resemble.js b/resemble.js index 5bbd83a..b6ad4dd 100644 --- a/resemble.js +++ b/resemble.js @@ -1,7 +1,7 @@ /* Author: James Cryer Company: Huddle -Last updated date: 23 Jul 2013 +Last updated date: 17 Sep 2013 URL: https://github.com/Huddle/Resemble.js */ @@ -439,9 +439,10 @@ URL: https://github.com/Huddle/Resemble.js data.isSameDimensions = true; } else { data.isSameDimensions = false; - data.dimensionDifference = { width: images[0].width - images[1].width, height: images[0].height - images[1].height }; } + data.dimensionDifference = { width: images[0].width - images[1].width, height: images[0].height - images[1].height }; + analyseImages( normalise(images[0],width, height), normalise(images[1],width, height), width, height); triggerDataUpdate();