Some desperate attempts to make IE8 work.

This commit is contained in:
FrozenCow 2011-02-18 00:07:59 +01:00
parent b860c7dd0e
commit 1388fa11e5
3 changed files with 14 additions and 6 deletions

View File

@ -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);
}
}

View File

@ -25,7 +25,7 @@
<script type="text/javascript">
$(document).ready(function() {
window.dynmap = new DynMap($.extend({
container: $('#mcmap'),
container: $('#mcmap')
}, config));
});
</script>

View File

@ -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;