From 58787df8256959719593a89bd33c15086e6d69b3 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Sat, 3 Mar 2018 14:56:19 +0100 Subject: [PATCH] Working on receipt zooming --- Site/Pages/v5/Financial/FileExpenseClaim.aspx | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/Site/Pages/v5/Financial/FileExpenseClaim.aspx b/Site/Pages/v5/Financial/FileExpenseClaim.aspx index ba395c0d..84dede64 100644 --- a/Site/Pages/v5/Financial/FileExpenseClaim.aspx +++ b/Site/Pages/v5/Financial/FileExpenseClaim.aspx @@ -102,14 +102,18 @@ $('#imgModalDocument').attr('src', '/Pages/v5/Support/StreamUpload.aspx?DocId=' + result.DocumentId); $('#imgModalDocument').attr('data-zoom-image', '/Pages/v5/Support/StreamUpload.aspx?DocId=' + result.DocumentId + '&hq=1'); $('.zoomContainer').remove(); - $('#imgModalDocument').elevateZoom({ - zoomType: "lens", - cursor: "crosshair", - zoomWindowFadeIn: 200, - zoomWindowFadeOut: 200, - lensShape: "round", - lensSize: 150 - }); + $('#imgModalDocument').removeData(image, 'elevateZoom'); + $('#imgModalDocument').removeData(image, 'zoomImage'); + setTimeout(function () { + $('#imgModalDocument').elevateZoom({ + zoomType: "lens", + cursor: "crosshair", + zoomWindowFadeIn: 200, + zoomWindowFadeOut: 200, + lensShape: "round", + lensSize: 150 + }); + }, 50); // delay this slightly for race condition reasons } }); }