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:
1
app.js
1
app.js
@@ -133,6 +133,7 @@ $(function() {
|
|||||||
|
|
||||||
// Replace image with new SVG
|
// Replace image with new SVG
|
||||||
$img.replaceWith($svg);
|
$img.replaceWith($svg);
|
||||||
|
$('.keyboard-slider').height($svg.height());
|
||||||
|
|
||||||
// Quick fix as jQuery 2.1.4 addClass() method is not working on SVG elements.
|
// Quick fix as jQuery 2.1.4 addClass() method is not working on SVG elements.
|
||||||
var finalClasses = $svg.attr('class');
|
var finalClasses = $svg.attr('class');
|
||||||
|
|||||||
Reference in New Issue
Block a user