mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-01-12 19:00:44 +01:00
Compass style based on map type. Hacky because widgets have classes, not IDs
This commit is contained in:
parent
553a956949
commit
8d5f081cdf
@ -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
BIN
web/images/compass_flat.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.8 KiB |
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user