Clean up init of coord widget

This commit is contained in:
Mike Primm 2020-05-02 18:19:17 -05:00
parent 15cf132ada
commit 80f8aca6f7
3 changed files with 7 additions and 5 deletions

View File

@ -1 +1,2 @@
/build/
/bin/

View File

@ -2288,8 +2288,9 @@ public class DynmapCore implements DynmapCommonAPI {
else { // First time, delete old external texture pack
deleteDirectory(new File(df, "texturepacks/standard"));
}
String curver = this.getDynmapCoreVersion();
/* If matched, we're good */
if (prevver.equals(this.getDynmapCoreVersion())) {
if (prevver.equals(curver) && (!curver.endsWith(("-Dev")))) {
return;
}
/* Get deleted file list */

View File

@ -6,21 +6,21 @@ componentconstructors['coord'] = function(dynmap, configuration) {
chunkfield: $('<span/>'),
onAdd: function(map) {
if(configuration.hidey)
if(configuration.hidey)
this._container = L.DomUtil.create('div', 'coord-control coord-control-noy');
else
this._container = L.DomUtil.create('div', 'coord-control');
this._map = map;
$('<span/>').addClass('coord-control-label').text((configuration.label || 'x,y,z') + ': ').appendTo(this._container);
$('<br/>').appendTo(this._container);
this.valfield.addClass('coord-control-value').text('').appendTo(this._container);
this.valfield.addClass('coord-control-value').text(configuration.hidey ? '---,---' : '---,---,---').appendTo(this._container);
if(configuration['show-mcr']) {
$('<br/>').appendTo(this._container);
this.mcrfield.addClass('coord-control-value').text('').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.chunkfield.addClass('coord-control-value').text('Chunk: ---,---').appendTo(this._container);
}
this._update();
return this.getContainer();