mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-27 20:58:40 +01:00
show-mc
This commit is contained in:
parent
e7fefeae8d
commit
15cf132ada
1
DynmapCore/bin/.gitignore
vendored
1
DynmapCore/bin/.gitignore
vendored
@ -1 +0,0 @@
|
||||
/main/
|
@ -3,6 +3,7 @@ componentconstructors['coord'] = function(dynmap, configuration) {
|
||||
var Coord = L.Control.extend({
|
||||
valfield: $('<span/>'),
|
||||
mcrfield: $('<span/>'),
|
||||
chunkfield: $('<span/>'),
|
||||
|
||||
onAdd: function(map) {
|
||||
if(configuration.hidey)
|
||||
@ -17,6 +18,10 @@ componentconstructors['coord'] = function(dynmap, configuration) {
|
||||
$('<br/>').appendTo(this._container);
|
||||
this.mcrfield.addClass('coord-control-value').text('').appendTo(this._container);
|
||||
}
|
||||
if(configuration['show-chunk']) {
|
||||
$('<br/>').appendTo(this._container);
|
||||
this.chunkfield.addClass('coord-control-value').text('').appendTo(this._container);
|
||||
}
|
||||
this._update();
|
||||
return this.getContainer();
|
||||
},
|
||||
@ -44,7 +49,9 @@ componentconstructors['coord'] = function(dynmap, configuration) {
|
||||
else
|
||||
coord.valfield.text(Math.round(loc.x) + ',' + loc.y + ',' + Math.round(loc.z));
|
||||
if(configuration['show-mcr'])
|
||||
coord.mcrfield.text('r.' + Math.floor(loc.x/512) + '.' + Math.floor(loc.z/512) + '.mcr');
|
||||
coord.mcrfield.text('r.' + Math.floor(loc.x/512) + '.' + Math.floor(loc.z/512) + '.mca');
|
||||
if(configuration['show-chunk'])
|
||||
coord.chunkfield.text('Chunk: ' + Math.floor(loc.x/16) + ',' + Math.floor(loc.z/16));
|
||||
});
|
||||
dynmap.map.on('mouseout', function(mevent) {
|
||||
if(!dynmap.map) return;
|
||||
@ -54,5 +61,7 @@ componentconstructors['coord'] = function(dynmap, configuration) {
|
||||
coord.valfield.text('---,---,---');
|
||||
if(configuration['show-mcr'])
|
||||
coord.mcrfield.text('--------');
|
||||
if(configuration['show-chunk'])
|
||||
coord.chunkfield.text('Chunk: ---,---');
|
||||
});
|
||||
};
|
||||
|
@ -175,6 +175,7 @@ components:
|
||||
label: "Location"
|
||||
hidey: false
|
||||
show-mcr: false
|
||||
show-chunk: false
|
||||
|
||||
# Note: more than one logo component can be defined
|
||||
#- class: org.dynmap.ClientComponent
|
||||
|
@ -175,6 +175,7 @@ components:
|
||||
label: "Location"
|
||||
hidey: false
|
||||
show-mcr: false
|
||||
show-chunk: false
|
||||
|
||||
# Note: more than one logo component can be defined
|
||||
#- class: org.dynmap.ClientComponent
|
||||
|
@ -175,6 +175,7 @@ components:
|
||||
label: "Location"
|
||||
hidey: false
|
||||
show-mcr: false
|
||||
show-chunk: false
|
||||
|
||||
# Note: more than one logo component can be defined
|
||||
#- class: org.dynmap.ClientComponent
|
||||
|
@ -175,6 +175,7 @@ components:
|
||||
label: "Location"
|
||||
hidey: false
|
||||
show-mcr: false
|
||||
show-chunk: false
|
||||
|
||||
# Note: more than one logo component can be defined
|
||||
#- class: org.dynmap.ClientComponent
|
||||
|
@ -175,6 +175,7 @@ components:
|
||||
label: "Location"
|
||||
hidey: false
|
||||
show-mcr: false
|
||||
show-chunk: false
|
||||
|
||||
# Note: more than one logo component can be defined
|
||||
#- class: org.dynmap.ClientComponent
|
||||
|
@ -175,6 +175,7 @@ components:
|
||||
label: "Location"
|
||||
hidey: false
|
||||
show-mcr: false
|
||||
show-chunk: false
|
||||
|
||||
# Note: more than one logo component can be defined
|
||||
#- class: org.dynmap.ClientComponent
|
||||
|
@ -176,6 +176,7 @@ components:
|
||||
label: "Location"
|
||||
hidey: false
|
||||
show-mcr: false
|
||||
show-chunk: false
|
||||
|
||||
# Note: more than one logo component can be defined
|
||||
#- class: org.dynmap.ClientComponent
|
||||
|
Loading…
Reference in New Issue
Block a user