mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 03:05:28 +01:00
Fix player marker updating when players layer is hidden
This commit is contained in:
parent
ca9009e33f
commit
31938d530a
@ -94,7 +94,7 @@ componentconstructors['playermarkers'] = function(dynmap, configuration) {
|
|||||||
var markerPosition = dynmap.getProjection().fromLocationToLatLng(player.location);
|
var markerPosition = dynmap.getProjection().fromLocationToLatLng(player.location);
|
||||||
player.marker.setLatLng(markerPosition);
|
player.marker.setLatLng(markerPosition);
|
||||||
// Update health
|
// Update health
|
||||||
if (configuration.showplayerhealth) {
|
if (configuration.showplayerhealth && player.healthContainer) {
|
||||||
if (player.health !== undefined && player.armor !== undefined) {
|
if (player.health !== undefined && player.armor !== undefined) {
|
||||||
player.healthContainer.css('display','block');
|
player.healthContainer.css('display','block');
|
||||||
player.healthBar.css('width', Math.ceil(player.health*2.5) + 'px');
|
player.healthBar.css('width', Math.ceil(player.health*2.5) + 'px');
|
||||||
|
Loading…
Reference in New Issue
Block a user