diff --git a/web/css/dynmap_style.css b/web/css/dynmap_style.css index eda03af2..fd6fcee6 100644 --- a/web/css/dynmap_style.css +++ b/web/css/dynmap_style.css @@ -533,6 +533,10 @@ overflow:hidden; } +.worldlist { + overflow:hidden; +} + /******************* * players on the map */ diff --git a/web/js/map.js b/web/js/map.js index 047065d9..8d24028e 100644 --- a/web/js/map.js +++ b/web/js/map.js @@ -176,12 +176,39 @@ DynMap.prototype = { } if(!nopanel) sidebar.appendTo(container); + + // World scrollbuttons + var upbtn_world = $('
') + .addClass('scrollup') + .bind('mousedown mouseup', function(event){ + if(event.type == 'mousedown'){ + worldlist.animate({"scrollTop": "-=300px"}, 3000, 'linear'); + }else{ + worldlist.stop(); + } + }); + var downbtn_world = $('') + .addClass('scrolldown') + .bind('mousedown mouseup', function(event){ + if(event.type == 'mousedown'){ + worldlist.animate({"scrollTop": "+=300px"}, 3000, 'linear'); + }else{ + worldlist.stop(); + } + }); // Worlds var worldlist; $('') .append($('').text('Map Types')) - .append(me.worldlist = worldlist = $('