Commit 2ca6fa09 authored by Alexander.Trofimov's avatar Alexander.Trofimov

refactoring function _drawGrid

parent 9f1bcb63
...@@ -2367,19 +2367,19 @@ ...@@ -2367,19 +2367,19 @@
.setStrokeStyle(this.settings.cells.defaultState.border) .setStrokeStyle(this.settings.cells.defaultState.border)
.setLineWidth(1).beginPath(); .setLineWidth(1).beginPath();
var w, h; var i, d, l;
for (var i = range.c1, x = x1; i <= range.c2 && x <= x2; ++i) { for (i = range.c1, d = x1; i <= range.c2 && d <= x2; ++i) {
w = c[i].width; l = c[i].width;
x += w; d += l;
if (w >= this.width_1px) { if (l >= this.width_1px) {
ctx.lineVerPrevPx(x, y1, y2); ctx.lineVerPrevPx(d, y1, y2);
} }
} }
for (var j = range.r1, y = y1; j <= range.r2 && y <= y2; ++j) { for (i = range.r1, d = y1; i <= range.r2 && d <= y2; ++i) {
h = r[j].height; l = r[i].height;
y += h; d += l;
if (h >= this.height_1px) { if (l >= this.height_1px) {
ctx.lineHorPrevPx(x1, y, x2); ctx.lineHorPrevPx(x1, d, x2);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment