Some desperate attempts to make IE8 work.
This commit is contained in:
parent
a3e2606486
commit
bf4ea4f08d
3 changed files with 14 additions and 6 deletions
|
|
@ -73,11 +73,11 @@ CustomMarker.prototype.show = function() {
|
||||||
}
|
}
|
||||||
|
|
||||||
CustomMarker.prototype.toggle = function(t) {
|
CustomMarker.prototype.toggle = function(t) {
|
||||||
if (typeof t == "boolean") {
|
if ((typeof t) == "boolean") {
|
||||||
if (t) this.show();
|
if (t) { this.show(); }
|
||||||
else this.hide();
|
else { this.hide(); }
|
||||||
} else {
|
} else {
|
||||||
this.toggle(this.isHidden == true);
|
this.toggle((this.isHidden) == true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
window.dynmap = new DynMap($.extend({
|
window.dynmap = new DynMap($.extend({
|
||||||
container: $('#mcmap'),
|
container: $('#mcmap')
|
||||||
}, config));
|
}, config));
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
|
||||||
10
web/map.js
10
web/map.js
|
|
@ -123,13 +123,20 @@ DynMap.prototype = {
|
||||||
// Sidebar
|
// Sidebar
|
||||||
var sidebar = me.sidebar = $('<div/>')
|
var sidebar = me.sidebar = $('<div/>')
|
||||||
.addClass('sidebar')
|
.addClass('sidebar')
|
||||||
//.addClass('pinned')
|
|
||||||
.appendTo(container);
|
.appendTo(container);
|
||||||
|
|
||||||
var panel = $('<div/>')
|
var panel = $('<div/>')
|
||||||
.addClass('panel')
|
.addClass('panel')
|
||||||
.appendTo(sidebar);
|
.appendTo(sidebar);
|
||||||
|
|
||||||
|
// Pin button.
|
||||||
|
var pinbutton = $('<div/>')
|
||||||
|
.addClass('pin')
|
||||||
|
.click(function() {
|
||||||
|
sidebar.toggleClass('pinned');
|
||||||
|
})
|
||||||
|
.appendTo(panel);
|
||||||
|
|
||||||
// Worlds
|
// Worlds
|
||||||
var worldlist;
|
var worldlist;
|
||||||
$('<fieldset/>')
|
$('<fieldset/>')
|
||||||
|
|
@ -210,6 +217,7 @@ DynMap.prototype = {
|
||||||
setTimeout(function() { me.update(); }, me.options.updaterate);
|
setTimeout(function() { me.update(); }, me.options.updaterate);
|
||||||
},
|
},
|
||||||
selectMap: function(map) {
|
selectMap: function(map) {
|
||||||
|
if (!map) { throw "Cannot select map " + map; }
|
||||||
var me = this;
|
var me = this;
|
||||||
me.map.setMapTypeId('none');
|
me.map.setMapTypeId('none');
|
||||||
me.world = map.world;
|
me.world = map.world;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue