diff --git a/web/css/dynmap_style.css b/web/css/dynmap_style.css index a9c2247b..903d65cd 100644 --- a/web/css/dynmap_style.css +++ b/web/css/dynmap_style.css @@ -418,6 +418,11 @@ background: url(images/scrollup.png) rgba(32,32,32,0.6); margin-bottom: 4px; + + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; } .panel .scrolldown { @@ -425,6 +430,11 @@ background: url(images/scrolldown.png) rgba(32,32,32,0.6); margin-top: 4px; + + -moz-border-radius: 2px; + -webkit-border-radius: 2px; + -o-border-radius: 2px; + border-radius: 2px; } .panel .scrollup:hover, .panel .scrolldown:hover { @@ -454,11 +464,6 @@ background-repeat: no-repeat; background-position: center; - - -moz-border-radius: 2px; - -webkit-border-radius: 2px; - -o-border-radius: 2px; - border-radius: 2px; } .playerlist { diff --git a/web/js/map.js b/web/js/map.js index 67dd0cc3..afe5516a 100644 --- a/web/js/map.js +++ b/web/js/map.js @@ -182,13 +182,46 @@ DynMap.prototype = { .appendTo(largeclock) ); + // The scrollbuttons + // we need to show/hide them depending: if (me.playerlist.scrollHeight() > me.playerlist.innerHeight()) or something. + var upbtn = $('
') + .addClass('scrollup') + .bind('mousedown mouseup', function(event){ + if(event.type == 'mousedown'){ + playerlist.animate({"scrollTop": "-=300px"}, 3000, 'linear'); + }else{ + playerlist.stop(); + } + }); + var downbtn = $('') + .addClass('scrolldown') + .bind('mousedown mouseup', function(event){ + if(event.type == 'mousedown'){ + playerlist.animate({"scrollTop": "+=300px"}, 3000, 'linear'); + }else{ + playerlist.stop(); + } + }); + // The Player List var playerlist; $('') .append($('').text('Players')) - .append(me.playerlist = playerlist = $('