mirror of
https://github.com/webbukkit/dynmap.git
synced 2025-03-29 06:45:44 +01:00
Some desperate attempts to make IE8 work.
This commit is contained in:
parent
b860c7dd0e
commit
1388fa11e5
@ -73,11 +73,11 @@ CustomMarker.prototype.show = function() {
|
||||
}
|
||||
|
||||
CustomMarker.prototype.toggle = function(t) {
|
||||
if (typeof t == "boolean") {
|
||||
if (t) this.show();
|
||||
else this.hide();
|
||||
if ((typeof t) == "boolean") {
|
||||
if (t) { this.show(); }
|
||||
else { this.hide(); }
|
||||
} else {
|
||||
this.toggle(this.isHidden == true);
|
||||
this.toggle((this.isHidden) == true);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
window.dynmap = new DynMap($.extend({
|
||||
container: $('#mcmap'),
|
||||
container: $('#mcmap')
|
||||
}, config));
|
||||
});
|
||||
</script>
|
||||
|
10
web/map.js
10
web/map.js
@ -123,13 +123,20 @@ DynMap.prototype = {
|
||||
// Sidebar
|
||||
var sidebar = me.sidebar = $('<div/>')
|
||||
.addClass('sidebar')
|
||||
//.addClass('pinned')
|
||||
.appendTo(container);
|
||||
|
||||
var panel = $('<div/>')
|
||||
.addClass('panel')
|
||||
.appendTo(sidebar);
|
||||
|
||||
// Pin button.
|
||||
var pinbutton = $('<div/>')
|
||||
.addClass('pin')
|
||||
.click(function() {
|
||||
sidebar.toggleClass('pinned');
|
||||
})
|
||||
.appendTo(panel);
|
||||
|
||||
// Worlds
|
||||
var worldlist;
|
||||
$('<fieldset/>')
|
||||
@ -210,6 +217,7 @@ DynMap.prototype = {
|
||||
setTimeout(function() { me.update(); }, me.options.updaterate);
|
||||
},
|
||||
selectMap: function(map) {
|
||||
if (!map) { throw "Cannot select map " + map; }
|
||||
var me = this;
|
||||
me.map.setMapTypeId('none');
|
||||
me.world = map.world;
|
||||
|
Loading…
Reference in New Issue
Block a user