Minor fix in jit.js, this bug was only seen in Webkit-based browsers such as Chrome/Chromium
Change-Id: Ied1b2c68ce98d7d6b9385b9c2f3f56cf34ba8fed
Signed-off-by: Andrew Kim <andrekim@cisco.com>
};
} else {
ctx.drawImage(img,pos.x-32,pos.y-32);
};
} else {
ctx.drawImage(img,pos.x-32,pos.y-32);
+ img.onload = function() {
+ ctx.drawImage(img,pos.x-32,pos.y-32);
+ };
- /*var width = 64, height = 55;
- ctx.fillStyle = "rgba(0,0,0,0)";
- ctx.fillRect(pos.x - width / 2, pos.y - height / 2, width, height);*/
},
'contains': function(npos, pos) {
var width = 64, height = 55;
},
'contains': function(npos, pos) {
var width = 64, height = 55;
};
} else {
ctx.drawImage(img,pos.x-32,pos.y-32);
};
} else {
ctx.drawImage(img,pos.x-32,pos.y-32);
+ img.onload = function() {
+ ctx.drawImage(img,pos.x-32,pos.y-32);
+ };
- /*var width = 64, height = 45;
- ctx.fillStyle = "rgba(0,0,0,0)";
- ctx.fillRect(pos.x - width / 2, pos.y - height / 2, width, height);*/
},
'contains': function(npos, pos) {
var width = 64, height = 45;
},
'contains': function(npos, pos) {
var width = 64, height = 45;