change property getter into methods

This commit is contained in:
Jörg Breitbart
2019-02-01 01:10:20 +01:00
parent 594797e05b
commit 079729f1b4
14 changed files with 217 additions and 217 deletions
+7 -7
View File
@@ -95,17 +95,17 @@ export class CellData implements ICellData {
public combinedData: string = '';
/** Whether cell contains a combined string. */
public get isCombined(): number {
public isCombined(): number {
return this.content & Content.IS_COMBINED;
}
/** Width of the cell. */
public get width(): number {
public getWidth(): number {
return this.content >> Content.WIDTH_SHIFT;
}
/** JS string of the content. */
public get chars(): string {
public getChars(): string {
if (this.content & Content.IS_COMBINED) {
return this.combinedData;
}
@@ -121,8 +121,8 @@ export class CellData implements ICellData {
* if content is a combined string it returns the codepoint
* of the last char in string to be in line with code in CharData.
* */
public get code(): number {
return (this.isCombined)
public getCode(): number {
return (this.isCombined())
? this.combinedData.charCodeAt(this.combinedData.length - 1)
: this.content & Content.CODEPOINT_MASK;
}
@@ -160,8 +160,8 @@ export class CellData implements ICellData {
}
/** Get data as CharData. */
public get asCharData(): CharData {
return [this.fg, this.chars, this.width, this.code];
public getAsCharData(): CharData {
return [this.fg, this.getChars(), this.getWidth(), this.getCode()];
}
}