Compass style based on map type. Hacky because widgets have classes, not IDs

This commit is contained in:
zeeZ 2011-04-09 08:24:52 +02:00
parent 553a956949
commit 8d5f081cdf
3 changed files with 15 additions and 1 deletions

View File

@ -506,7 +506,7 @@
position: absolute;
z-index: 10;
top: 10px;
top: 20px;
right: 32px;
height: 84px;
@ -516,6 +516,16 @@
background-image: url(../images/compass.png);
}
.compass_flat {
top: 10px;
right: 21px;
height: 105px;
width: 105px;
background-image: url(../images/compass_flat.png);
}
/*******************
* Chat
*/

BIN
web/images/compass_flat.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -302,6 +302,10 @@ DynMap.prototype = {
if (me.maptype === map) {
return;
}
if (me.maptype) {
$('.compass').removeClass('compass_' + me.maptype.name);
}
$('.compass').addClass('compass_' + map.name);
var worldChanged = me.world !== map.world;
me.map.setMapTypeId('none');
me.world = map.world;