mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-11-24 19:25:15 +01:00
Add 'pinned' choice for showlayercontrol: setting - show expanded layer control
This commit is contained in:
parent
dc7efc2642
commit
514e96605b
@ -25,7 +25,7 @@ public class ClientConfigurationComponent extends Component {
|
||||
s(t, "sidebaropened", c.getString("sidebaropened", "false"));
|
||||
s(t, "dynmapversion", plugin.getDescription().getVersion());
|
||||
s(t, "cyrillic", c.getBoolean("cyrillic-support", false));
|
||||
s(t, "showlayercontrol", c.getBoolean("showlayercontrol", true));
|
||||
s(t, "showlayercontrol", c.getString("showlayercontrol", "true"));
|
||||
s(t, "grayplayerswhenhidden", c.getBoolean("grayplayerswhenhidden", true));
|
||||
String sn = plugin.getServer().getServerName();
|
||||
if(sn.equals("Unknown Server"))
|
||||
|
@ -109,8 +109,8 @@ DynMap.prototype = {
|
||||
if(urlzoom != null)
|
||||
me.options.defaultzoom = urlzoom;
|
||||
|
||||
var showlayerctl = me.getBoolParameterByName('showlayercontrol');
|
||||
if(showlayerctl != null)
|
||||
var showlayerctl = me.getParameterByName('showlayercontrol');
|
||||
if(showlayerctl != "")
|
||||
me.options.showlayercontrol = showlayerctl;
|
||||
|
||||
if(typeof me.options.defaultzoom == 'undefined')
|
||||
@ -786,8 +786,10 @@ DynMap.prototype = {
|
||||
addToLayerSelector: function(layer, name, priority) {
|
||||
var me = this;
|
||||
|
||||
if(me.options.showlayercontrol && (!me.layercontrol)) {
|
||||
if(me.options.showlayercontrol != "false" && (!me.layercontrol)) {
|
||||
me.layercontrol = new DynmapLayerControl();
|
||||
if(me.options.showlayercontrol == "pinned")
|
||||
me.layercontrol.options.collapsed = false;
|
||||
map.addControl(me.layercontrol);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user