Improve type checking with cast

This commit is contained in:
Tom Payne
2013-11-10 02:21:50 +01:00
parent d10fb12f27
commit e94a8d4a36

View File

@@ -99,7 +99,7 @@ ol.replay.canvas.Batch.prototype.draw = function(context, transform) {
var end, j, jj;
for (j = 0, jj = instructions.length; j < jj; ++j) {
var instruction = instructions[j];
var type = instruction[0];
var type = /** @type {ol.replay.canvas.Instruction} */ (instruction[0]);
if (type == ol.replay.canvas.Instruction.BEGIN_PATH) {
context.beginPath();
} else if (type == ol.replay.canvas.Instruction.CLOSE_PATH) {