mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-28 19:47:45 +01:00
Fix IE exceptions from debug code, canvas calls
This commit is contained in:
parent
55720cfd4d
commit
5b7ad0f4c9
@ -22,7 +22,6 @@ componentconstructors['chatballoon'] = function(dynmap, configuration) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var popupPosition = dynmap.getProjection().fromLocationToLatLng(player.location);
|
var popupPosition = dynmap.getProjection().fromLocationToLatLng(player.location);
|
||||||
console.log('popupPosition', popupPosition);
|
|
||||||
var popup = me.chatpopups[message.name];
|
var popup = me.chatpopups[message.name];
|
||||||
if (!popup) {
|
if (!popup) {
|
||||||
me.chatpopups[message.name] = popup = {
|
me.chatpopups[message.name] = popup = {
|
||||||
|
@ -22,11 +22,16 @@ function createMinecraftHead(player,completed,failed) {
|
|||||||
var headCanvas = document.createElement('canvas');
|
var headCanvas = document.createElement('canvas');
|
||||||
headCanvas.width = 8;
|
headCanvas.width = 8;
|
||||||
headCanvas.height = 8;
|
headCanvas.height = 8;
|
||||||
var headContext = headCanvas.getContext('2d');
|
if(headCanvas.getContext) {
|
||||||
blitImage(headContext, skinImage, 8,8,8,8, 0,0,8,8);
|
var headContext = headCanvas.getContext('2d');
|
||||||
// Turn off accessory face overlay - causes white faces, and very few skins seem to have them anyway
|
blitImage(headContext, skinImage, 8,8,8,8, 0,0,8,8);
|
||||||
//blitImage(headContext, skinImage, 40,8,8,8, 0,0,8,8);
|
// Turn off accessory face overlay - causes white faces, and very few skins seem to have them anyway
|
||||||
completed(headCanvas);
|
//blitImage(headContext, skinImage, 40,8,8,8, 0,0,8,8);
|
||||||
|
completed(headCanvas);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
failed();
|
||||||
|
}
|
||||||
};
|
};
|
||||||
skinImage.onerror = function() {
|
skinImage.onerror = function() {
|
||||||
if (skinImage.src == '//www.minecraft.net/img/char.png') {
|
if (skinImage.src == '//www.minecraft.net/img/char.png') {
|
||||||
|
Loading…
Reference in New Issue
Block a user