permanently rename ascii->line for borders.

This commit is contained in:
Christopher Jeffrey 2013-07-16 19:07:46 -05:00
parent 9ed9764b74
commit aa9bd9da6a

View File

@ -1396,7 +1396,7 @@ function Element(options) {
this.border = options.border;
if (this.border) {
this.border.type = this.border.type || 'bg';
if (this.border.type === 'line') this.border.type = 'ascii';
if (this.border.type === 'ascii') this.border.type = 'line';
this.border.ch = this.border.ch || ' ';
if (!this.border.style) {
this.border.style = {};
@ -2180,7 +2180,7 @@ outer:
yi = yi_;
for (xi = xi_; xi < xl; xi++) {
if (!lines[yi]) break;
if (this.border.type === 'ascii') {
if (this.border.type === 'line') {
if (xi === xi_) ch = '┌';
else if (xi === xl - 1) ch = '┐';
else ch = '─';
@ -2198,7 +2198,7 @@ outer:
yi = yi_ + 1;
for (; yi < yl; yi++) {
if (!lines[yi]) break;
if (this.border.type === 'ascii') {
if (this.border.type === 'line') {
ch = '│';
} else if (this.border.type === 'bg') {
ch = this.border.ch;
@ -2221,7 +2221,7 @@ outer:
yi = yl - 1;
for (xi = xi_; xi < xl; xi++) {
if (!lines[yi]) break;
if (this.border.type === 'ascii') {
if (this.border.type === 'line') {
if (xi === xi_) ch = '└';
else if (xi === xl - 1) ch = '┘';
else ch = '─';
@ -2389,7 +2389,7 @@ function Line(options) {
options.height = 1;
}
this.ch = !options.type || options.type === 'ascii'
this.ch = !options.type || options.type === 'line'
? orientation === 'horizontal' ? '─' : '│'
: options.ch || ' ';