Improve type checking with cast
This commit is contained in:
@@ -99,7 +99,7 @@ ol.replay.canvas.Batch.prototype.draw = function(context, transform) {
|
|||||||
var end, j, jj;
|
var end, j, jj;
|
||||||
for (j = 0, jj = instructions.length; j < jj; ++j) {
|
for (j = 0, jj = instructions.length; j < jj; ++j) {
|
||||||
var instruction = instructions[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) {
|
if (type == ol.replay.canvas.Instruction.BEGIN_PATH) {
|
||||||
context.beginPath();
|
context.beginPath();
|
||||||
} else if (type == ol.replay.canvas.Instruction.CLOSE_PATH) {
|
} else if (type == ol.replay.canvas.Instruction.CLOSE_PATH) {
|
||||||
|
|||||||
Reference in New Issue
Block a user