From 13e477d03cc77a86f25da72a115bcb993b901f7f Mon Sep 17 00:00:00 2001 From: Arpad Csanyi Date: Thu, 17 Mar 2016 16:08:36 +0100 Subject: [PATCH] Recalculate .keyboard-slider height when changing imgs to svgs. #15. If UI is loaded on a smaller screen, the svg will be cut in half as the height of the image will be smaller then the height of the svg. There could be other solutions for this, but this was the quickest, and it's sufficient for the purpose of the mockup. --- app.js | 1 + 1 file changed, 1 insertion(+) diff --git a/app.js b/app.js index 285c1169..f2634561 100644 --- a/app.js +++ b/app.js @@ -133,6 +133,7 @@ $(function() { // Replace image with new SVG $img.replaceWith($svg); + $('.keyboard-slider').height($svg.height()); // Quick fix as jQuery 2.1.4 addClass() method is not working on SVG elements. var finalClasses = $svg.attr('class');