diff --git a/src/main/java/org/dynmap/ClientConfigurationComponent.java b/src/main/java/org/dynmap/ClientConfigurationComponent.java index 82da1775..51f3f9f7 100644 --- a/src/main/java/org/dynmap/ClientConfigurationComponent.java +++ b/src/main/java/org/dynmap/ClientConfigurationComponent.java @@ -20,7 +20,7 @@ public class ClientConfigurationComponent extends Component { s(t, "spammessage", c.getString("spammessage", "You may only chat once every %interval% seconds.")); s(t, "webprefix", unescapeString(c.getString("webprefix", "[WEB] "))); s(t, "defaultzoom", c.getInteger("defaultzoom", 0)); - s(t, "sidebaropened", c.getBoolean("sidebaropened", false)); + s(t, "sidebaropened", c.getString("sidebaropened", "false")); DynmapWorld defaultWorld = null; String defmap = null; diff --git a/src/main/resources/configuration.txt b/src/main/resources/configuration.txt index fce4e341..daac4053 100644 --- a/src/main/resources/configuration.txt +++ b/src/main/resources/configuration.txt @@ -260,7 +260,7 @@ updaterate: 2000 showplayerfacesinmenu: true -# Set sidebaropened: true to pin menu sidebar opened +# Set sidebaropened: 'true' to pin menu sidebar opened permanently, 'pinned' to default the sidebar to pinned, but allow it to unpin #sidebaropened: true joinmessage: "%playername% joined" diff --git a/web/js/map.js b/web/js/map.js index a571cdec..23a1ba47 100644 --- a/web/js/map.js +++ b/web/js/map.js @@ -145,10 +145,15 @@ DynMap.prototype = { var panel; var sidebar; var pinbutton; - if(!me.options.sidebaropened) { + + if(me.options.sidebaropened != 'true') { // false or pinned + var pincls = 'pinned' + if(me.options.sidebaropened == 'false') + pincls = ''; + sidebar = me.sidebar = $('
') - .addClass('sidebar') - .appendTo(container); + .addClass('sidebar ' + pincls) + .appendTo(container); panel = $('
') .addClass('panel') @@ -271,7 +276,7 @@ DynMap.prototype = { .append(link=$('')) .data('link', link) .appendTo(container);*/ - if(!me.options.sidebaropened) { + if(me.options.sidebaropened != 'true') { $('
') .addClass('hitbar') .appendTo(panel);