Use polyfill for TypedArray.fill

This commit is contained in:
Daniel Imms
2018-11-23 07:14:56 -08:00
parent 1567b41d6e
commit 128b1b0a48
3 changed files with 11 additions and 8 deletions
+3 -2
View File
@@ -4,6 +4,7 @@
*/
import { IRenderModel, ISelectionRenderModel } from './Types';
import { fill } from '../../core/TypedArrayUtils';
export const RENDER_MODEL_INDICIES_PER_CELL = 4;
@@ -42,8 +43,8 @@ export class RenderModel implements IRenderModel {
}
public clear(): void {
this.cells.fill(0, 0);
this.lineLengths.fill(0, 0);
fill(this.cells, 0, 0);
fill(this.lineLengths, 0, 0);
this.clearSelection();
}