From 609ceea71b00569ea30a6db749e174987b595fda Mon Sep 17 00:00:00 2001 From: Jason Park Date: Sun, 22 May 2016 22:26:08 -0500 Subject: [PATCH] fix array1d and 2d (2) --- index.html | 1 - js/module/array2d.js | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index 9a0f612..7d1bd27 100644 --- a/index.html +++ b/index.html @@ -109,7 +109,6 @@ - diff --git a/js/module/array2d.js b/js/module/array2d.js index 0b0208f..6028203 100644 --- a/js/module/array2d.js +++ b/js/module/array2d.js @@ -152,6 +152,8 @@ Array2DTracer.prototype = $.extend(true, Object.create(Tracer.prototype), { this.pushStep(step, type == 'select'); }, processStep: function (step, options) { + var tracer = this; + switch (step.type) { case 'notifying': var $row = $table.find('.mtbl-row').eq(step.x); @@ -165,7 +167,7 @@ Array2DTracer.prototype = $.extend(true, Object.create(Tracer.prototype), { step.coords.forEach(function (coord) { var x = coord.x; var y = coord.y; - this.paintColor(x, y, x, y, colorClass, addClass); + tracer.paintColor(x, y, x, y, colorClass, addClass); }); } else { var sx = step.sx; -- GitLab