From 5d5df570b88f6cc0b3ad559311b622496cff2d81 Mon Sep 17 00:00:00 2001 From: James Cryer Date: Wed, 20 Feb 2013 13:45:58 +0000 Subject: [PATCH] performance tweaks --- demoassets/main.js | 8 ++- index.html | 2 +- resemble.js | 142 ++++++++++++++++++++++++--------------------- 3 files changed, 82 insertions(+), 70 deletions(-) diff --git a/demoassets/main.js b/demoassets/main.js index 7463927..1899a51 100644 --- a/demoassets/main.js +++ b/demoassets/main.js @@ -50,15 +50,19 @@ $(function(){ }); function onComplete(data){ + var time = Date.now(); var diffImage = new Image(); - diffImage.src = data.imageDiffFileData; + diffImage.src = data.getImageDataUrl(); + + console.log(data.analysisTime); + $('#image-diff').html(diffImage); $(diffImage).click(function(){ window.open(diffImage.src, '_blank'); }); - $('#button').show(); + $('#buttons').show(); if(data.misMatchPercentage == 0){ $('#thesame').show(); diff --git a/index.html b/index.html index 4c27892..0c88c43 100644 --- a/index.html +++ b/index.html @@ -81,7 +81,7 @@ Diff will appear here.
-
+