fix error on table screen overlap.

This commit is contained in:
Christopher Jeffrey 2015-04-02 06:21:36 -07:00
parent cf3eb09f9f
commit 6b3610450c
1 changed files with 5 additions and 0 deletions

View File

@ -7141,6 +7141,7 @@ Table.prototype.render = function() {
// Apply attributes to header cells and cells. // Apply attributes to header cells and cells.
// Problem: Does not allow for tags in cells. // Problem: Does not allow for tags in cells.
// for (var y = this.iheight / 2; y < height; y++) { // for (var y = this.iheight / 2; y < height; y++) {
// if (!lines[yi + y]) break;
// for (var x = this.iwidth / 2; x < width; x++) { // for (var x = this.iwidth / 2; x < width; x++) {
// if (y === this.iheight / 2) { // if (y === this.iheight / 2) {
// lines[yi + y][xi + x][0] = header; // lines[yi + y][xi + x][0] = header;
@ -7155,6 +7156,7 @@ Table.prototype.render = function() {
// Draw border with correct angles. // Draw border with correct angles.
ry = 0; ry = 0;
for (i = 0; i < self.rows.length + 1; i++) { for (i = 0; i < self.rows.length + 1; i++) {
if (!lines[yi + ry]) break;
rx = 0; rx = 0;
self._maxes.forEach(function(max, i) { self._maxes.forEach(function(max, i) {
rx += max; rx += max;
@ -7211,6 +7213,7 @@ Table.prototype.render = function() {
// Draw internal borders. // Draw internal borders.
for (ry = 1; ry < self.rows.length * 2; ry++) { for (ry = 1; ry < self.rows.length * 2; ry++) {
if (!lines[yi + ry]) break;
rx = 0; rx = 0;
self._maxes.slice(0, -1).forEach(function(max, i) { self._maxes.slice(0, -1).forEach(function(max, i) {
rx += max; rx += max;
@ -7445,6 +7448,7 @@ ListTable.prototype.render = function() {
// Draw border with correct angles. // Draw border with correct angles.
ry = 0; ry = 0;
for (i = 0; i < height + 1; i++) { for (i = 0; i < height + 1; i++) {
if (!lines[yi + ry]) break;
rx = 0; rx = 0;
self._maxes.slice(0, -1).forEach(function(max, i) { self._maxes.slice(0, -1).forEach(function(max, i) {
rx += max; rx += max;
@ -7467,6 +7471,7 @@ ListTable.prototype.render = function() {
// Draw internal borders. // Draw internal borders.
for (ry = 1; ry < height; ry++) { for (ry = 1; ry < height; ry++) {
if (!lines[yi + ry]) break;
rx = 0; rx = 0;
self._maxes.slice(0, -1).forEach(function(max, i) { self._maxes.slice(0, -1).forEach(function(max, i) {
rx += max; rx += max;