mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-09-29 14:17:26 +02: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;
|
position: absolute;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
|
||||||
top: 10px;
|
top: 20px;
|
||||||
right: 32px;
|
right: 32px;
|
||||||
|
|
||||||
height: 84px;
|
height: 84px;
|
||||||
@ -516,6 +516,16 @@
|
|||||||
background-image: url(../images/compass.png);
|
background-image: url(../images/compass.png);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.compass_flat {
|
||||||
|
top: 10px;
|
||||||
|
right: 21px;
|
||||||
|
|
||||||
|
height: 105px;
|
||||||
|
width: 105px;
|
||||||
|
|
||||||
|
background-image: url(../images/compass_flat.png);
|
||||||
|
}
|
||||||
|
|
||||||
/*******************
|
/*******************
|
||||||
* Chat
|
* 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) {
|
if (me.maptype === map) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (me.maptype) {
|
||||||
|
$('.compass').removeClass('compass_' + me.maptype.name);
|
||||||
|
}
|
||||||
|
$('.compass').addClass('compass_' + map.name);
|
||||||
var worldChanged = me.world !== map.world;
|
var worldChanged = me.world !== map.world;
|
||||||
me.map.setMapTypeId('none');
|
me.map.setMapTypeId('none');
|
||||||
me.world = map.world;
|
me.world = map.world;
|
||||||
|
Loading…
Reference in New Issue
Block a user