Merge pull request #372 from Tyriar/335_viewport_tidy

Clean up viewport more after TS conversion
This commit is contained in:
Daniel Imms
2016-11-28 08:06:50 -08:00
committed by GitHub
2 changed files with 7 additions and 4 deletions
+7 -3
View File
@@ -8,15 +8,19 @@ import { ITerminal } from './Interfaces';
/** /**
* Represents the viewport of a terminal, the visible area within the larger buffer of output. * Represents the viewport of a terminal, the visible area within the larger buffer of output.
* Logic for the virtual scroll bar is included in this object. * Logic for the virtual scroll bar is included in this object.
* @param viewportElement The DOM element acting as the viewport.
* @param scrollArea The DOM element acting as the scroll area.
* @param charMeasureElement A DOM element used to measure the character size of. the terminal.
*/ */
export class Viewport { export class Viewport {
private currentRowHeight: number; private currentRowHeight: number;
private lastRecordedBufferLength: number; private lastRecordedBufferLength: number;
private lastRecordedViewportHeight: number; private lastRecordedViewportHeight: number;
/**
* Creates a new Viewport.
* @param terminal The terminal this viewport belongs to.
* @param viewportElement The DOM element acting as the viewport.
* @param scrollArea The DOM element acting as the scroll area.
* @param charMeasureElement A DOM element used to measure the character size of. the terminal.
*/
constructor( constructor(
private terminal: ITerminal, private terminal: ITerminal,
private viewportElement: HTMLElement, private viewportElement: HTMLElement,
-1
View File
@@ -5133,7 +5133,6 @@ var wcwidth = (function(opts) {
Terminal.EventEmitter = EventEmitter; Terminal.EventEmitter = EventEmitter;
Terminal.CompositionHelper = CompositionHelper; Terminal.CompositionHelper = CompositionHelper;
Terminal.Viewport = Viewport;
Terminal.inherits = inherits; Terminal.inherits = inherits;
/** /**