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.
This commit is contained in:
Arpad Csanyi
2016-03-17 16:08:36 +01:00
parent 7ab20e4a6f
commit 13e477d03c

1
app.js
View File

@@ -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');