From 6d39aba00157c149e8f84d67e455ddacb5250666 Mon Sep 17 00:00:00 2001 From: FrozenCow Date: Sun, 27 Nov 2011 23:15:41 +0800 Subject: [PATCH 1/4] Fixed locked on Y-axis (non continuous world). --- web/js/map.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/js/map.js b/web/js/map.js index 5a42d877..8b203b29 100644 --- a/web/js/map.js +++ b/web/js/map.js @@ -130,7 +130,8 @@ DynMap.prototype = { }), scale: function(zoom) { return (1 << zoom); - } + }, + continuousWorld: true }); window.map = map; // Placate Leaflet need for top-level 'map'.... From f13e91ad2b7ee2edba18e0b50f957eea33668a08 Mon Sep 17 00:00:00 2001 From: FrozenCow Date: Sun, 27 Nov 2011 23:40:25 +0800 Subject: [PATCH 2/4] Set worldCopyJump to false, just to be sure of future Leaflet updates. --- web/js/map.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/web/js/map.js b/web/js/map.js index 8b203b29..6c408a12 100644 --- a/web/js/map.js +++ b/web/js/map.js @@ -131,7 +131,8 @@ DynMap.prototype = { scale: function(zoom) { return (1 << zoom); }, - continuousWorld: true + continuousWorld: true, + worldCopyJump: false }); window.map = map; // Placate Leaflet need for top-level 'map'.... From a4056bc5020f513e897cf3811089de4fea16e8bc Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Tue, 29 Nov 2011 10:50:13 +0800 Subject: [PATCH 3/4] Bump to 0.26 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 90d54dde..75872a9f 100644 --- a/pom.xml +++ b/pom.xml @@ -2,7 +2,7 @@ 4.0.0 org.dynmap dynmap - 0.25.1 + 0.26 dynmap UTF-8 From 047897d0b0b3e7cd0644604b0844fd6207dd2539 Mon Sep 17 00:00:00 2001 From: Mike Primm Date: Tue, 29 Nov 2011 10:50:42 +0800 Subject: [PATCH 4/4] Make compass rose smaller on mobile device browsers --- web/css/dynmap_style.css | 8 ++++++++ web/js/map.js | 9 +++++---- 2 files changed, 13 insertions(+), 4 deletions(-) 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;