mirror of
https://github.com/webbukkit/dynmap.git
synced 2024-12-28 03:27:36 +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;
|
||||
}
|
||||
var popupPosition = dynmap.getProjection().fromLocationToLatLng(player.location);
|
||||
console.log('popupPosition', popupPosition);
|
||||
var popup = me.chatpopups[message.name];
|
||||
if (!popup) {
|
||||
me.chatpopups[message.name] = popup = {
|
||||
|
@ -22,11 +22,16 @@ function createMinecraftHead(player,completed,failed) {
|
||||
var headCanvas = document.createElement('canvas');
|
||||
headCanvas.width = 8;
|
||||
headCanvas.height = 8;
|
||||
var headContext = headCanvas.getContext('2d');
|
||||
blitImage(headContext, skinImage, 8,8,8,8, 0,0,8,8);
|
||||
// Turn off accessory face overlay - causes white faces, and very few skins seem to have them anyway
|
||||
//blitImage(headContext, skinImage, 40,8,8,8, 0,0,8,8);
|
||||
completed(headCanvas);
|
||||
if(headCanvas.getContext) {
|
||||
var headContext = headCanvas.getContext('2d');
|
||||
blitImage(headContext, skinImage, 8,8,8,8, 0,0,8,8);
|
||||
// Turn off accessory face overlay - causes white faces, and very few skins seem to have them anyway
|
||||
//blitImage(headContext, skinImage, 40,8,8,8, 0,0,8,8);
|
||||
completed(headCanvas);
|
||||
}
|
||||
else {
|
||||
failed();
|
||||
}
|
||||
};
|
||||
skinImage.onerror = function() {
|
||||
if (skinImage.src == '//www.minecraft.net/img/char.png') {
|
||||
|
Loading…
Reference in New Issue
Block a user