Move GridCache to browser

This commit is contained in:
Daniel Imms
2019-06-15 23:47:35 -07:00
parent e35d911fd1
commit b5093e0c29
3 changed files with 5 additions and 5 deletions
@@ -4,7 +4,7 @@
*/
import { assert } from 'chai';
import { GridCache } from './GridCache';
import { GridCache } from 'browser/renderer/GridCache';
describe('GridCache', () => {
let grid: GridCache<number>;
@@ -4,7 +4,7 @@
*/
export class GridCache<T> {
public cache: T[][];
public cache: (T | undefined)[][];
public constructor() {
this.cache = [];
@@ -16,7 +16,7 @@ export class GridCache<T> {
this.cache.push([]);
}
for (let y = this.cache[x].length; y < height; y++) {
this.cache[x].push(null);
this.cache[x].push(undefined);
}
this.cache[x].length = height;
}
@@ -26,7 +26,7 @@ export class GridCache<T> {
public clear(): void {
for (let x = 0; x < this.cache.length; x++) {
for (let y = 0; y < this.cache[x].length; y++) {
this.cache[x][y] = null;
this.cache[x][y] = undefined;
}
}
}
+1 -1
View File
@@ -6,7 +6,7 @@
import { ICharacterJoinerRegistry, IRenderDimensions } from 'browser/renderer/Types';
import { ITerminal } from '../Types';
import { CharData, ICellData } from 'common/Types';
import { GridCache } from './GridCache';
import { GridCache } from 'browser/renderer/GridCache';
import { BaseRenderLayer } from './BaseRenderLayer';
import { AttributeData } from 'common/buffer/AttributeData';
import { NULL_CELL_CODE, Content } from 'common/buffer/Constants';