diff --git a/web/css/dynmap_style.css b/web/css/dynmap_style.css index fd6fcee6..764d15dd 100644 --- a/web/css/dynmap_style.css +++ b/web/css/dynmap_style.css @@ -669,6 +669,14 @@ background-image: url(../images/compass_W.png); } +.mobilecompass { + top: 5px; + right: 10px; + height: 42px; + width: 42px; + background-size: cover; +} + /******************* * Chat */ diff --git a/web/js/map.js b/web/js/map.js index 6c408a12..592b0a35 100644 --- a/web/js/map.js +++ b/web/js/map.js @@ -306,10 +306,11 @@ DynMap.prototype = { updateHeight(); }); // The Compass - var compass = $('
') - .addClass('compass') - .appendTo(container); - + var compass = $(''). + addClass('compass'); + if(L.Browser.mobile) + compass.addClass('mobilecompass'); + compass.appendTo(container); // TODO: Enable hash-links. /* var link;