xterm-addon-webgl
Advanced tools
Comparing version 0.10.0-beta.1 to 0.10.0-beta.2
@@ -102,6 +102,3 @@ "use strict"; | ||
this._refreshCharAtlas(); | ||
this._rectangleRenderer.updateSelection(this._model.selection); | ||
this._glyphRenderer.updateSelection(this._model); | ||
this._model.clear(); | ||
this._model.clearSelection(); | ||
}; | ||
@@ -118,3 +115,2 @@ WebglRenderer.prototype.onDevicePixelRatioChange = function () { | ||
this._model.resize(this._terminal.cols, this._terminal.rows); | ||
this._rectangleRenderer.onResize(); | ||
this._renderLayers.forEach(function (l) { return l.resize(_this._terminal, _this.dimensions); }); | ||
@@ -127,2 +123,6 @@ this._canvas.width = this.dimensions.scaledCanvasWidth; | ||
this._core.screenElement.style.height = this.dimensions.canvasHeight + "px"; | ||
this._rectangleRenderer.onResize(); | ||
if (this._model.selection.hasSelection) { | ||
this._rectangleRenderer.updateSelection(this._model.selection); | ||
} | ||
this._glyphRenderer.setDimensions(this.dimensions); | ||
@@ -132,3 +132,2 @@ this._glyphRenderer.onResize(); | ||
this._model.clear(); | ||
this._model.clearSelection(); | ||
}; | ||
@@ -150,4 +149,2 @@ WebglRenderer.prototype.onCharSizeChanged = function () { | ||
this._updateSelectionModel(start, end, columnSelectMode); | ||
this._rectangleRenderer.updateSelection(this._model.selection); | ||
this._glyphRenderer.updateSelection(this._model); | ||
this._onRequestRedraw.fire({ start: 0, end: this._terminal.rows - 1 }); | ||
@@ -183,3 +180,2 @@ }; | ||
this._updateModel(0, this._terminal.rows - 1); | ||
this._glyphRenderer.updateSelection(this._model); | ||
this._onRequestRedraw.fire({ start: 0, end: this._terminal.rows - 1 }); | ||
@@ -212,3 +208,3 @@ }; | ||
this._model.clear(); | ||
this._model.clearSelection(); | ||
this._updateSelectionModel(undefined, undefined); | ||
} | ||
@@ -248,7 +244,12 @@ this._updateModel(start, end); | ||
this._rectangleRenderer.updateBackgrounds(this._model); | ||
if (this._model.selection.hasSelection) { | ||
this._glyphRenderer.updateSelection(this._model); | ||
} | ||
}; | ||
WebglRenderer.prototype._updateSelectionModel = function (start, end, columnSelectMode) { | ||
if (columnSelectMode === void 0) { columnSelectMode = false; } | ||
var terminal = this._terminal; | ||
if (!start || !end || (start[0] === end[0] && start[1] === end[1])) { | ||
this._model.clearSelection(); | ||
this._rectangleRenderer.updateSelection(this._model.selection); | ||
return; | ||
@@ -262,2 +263,3 @@ } | ||
this._model.clearSelection(); | ||
this._rectangleRenderer.updateSelection(this._model.selection); | ||
return; | ||
@@ -273,2 +275,3 @@ } | ||
this._model.selection.endCol = end[0]; | ||
this._rectangleRenderer.updateSelection(this._model.selection); | ||
}; | ||
@@ -275,0 +278,0 @@ WebglRenderer.prototype._updateDimensions = function () { |
{ | ||
"name": "xterm-addon-webgl", | ||
"version": "0.10.0-beta.1", | ||
"version": "0.10.0-beta.2", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "The xterm.js authors", |
@@ -119,8 +119,4 @@ /** | ||
this._rectangleRenderer.updateSelection(this._model.selection); | ||
this._glyphRenderer.updateSelection(this._model); | ||
// Force a full refresh | ||
this._model.clear(); | ||
this._model.clearSelection(); | ||
} | ||
@@ -142,3 +138,2 @@ | ||
this._model.resize(this._terminal.cols, this._terminal.rows); | ||
this._rectangleRenderer.onResize(); | ||
@@ -157,2 +152,9 @@ // Resize all render layers | ||
this._core.screenElement!.style.height = `${this.dimensions.canvasHeight}px`; | ||
this._rectangleRenderer.onResize(); | ||
if (this._model.selection.hasSelection) { | ||
// Update selection as dimensions have changed | ||
this._rectangleRenderer.updateSelection(this._model.selection); | ||
} | ||
this._glyphRenderer.setDimensions(this.dimensions); | ||
@@ -165,3 +167,2 @@ this._glyphRenderer.onResize(); | ||
this._model.clear(); | ||
this._model.clearSelection(); | ||
} | ||
@@ -186,5 +187,2 @@ | ||
this._rectangleRenderer.updateSelection(this._model.selection); | ||
this._glyphRenderer.updateSelection(this._model); | ||
this._onRequestRedraw.fire({ start: 0, end: this._terminal.rows - 1 }); | ||
@@ -228,3 +226,2 @@ } | ||
this._updateModel(0, this._terminal.rows - 1); | ||
this._glyphRenderer.updateSelection(this._model); | ||
this._onRequestRedraw.fire({ start: 0, end: this._terminal.rows - 1 }); | ||
@@ -262,3 +259,3 @@ } | ||
this._model.clear(); | ||
this._model.clearSelection(); | ||
this._updateSelectionModel(undefined, undefined); | ||
} | ||
@@ -313,5 +310,9 @@ | ||
this._rectangleRenderer.updateBackgrounds(this._model); | ||
if (this._model.selection.hasSelection) { | ||
// Model could be updated but the selection is unchanged | ||
this._glyphRenderer.updateSelection(this._model); | ||
} | ||
} | ||
private _updateSelectionModel(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean): void { | ||
private _updateSelectionModel(start: [number, number] | undefined, end: [number, number] | undefined, columnSelectMode: boolean = false): void { | ||
const terminal = this._terminal; | ||
@@ -322,2 +323,3 @@ | ||
this._model.clearSelection(); | ||
this._rectangleRenderer.updateSelection(this._model.selection); | ||
return; | ||
@@ -335,2 +337,3 @@ } | ||
this._model.clearSelection(); | ||
this._rectangleRenderer.updateSelection(this._model.selection); | ||
return; | ||
@@ -347,2 +350,4 @@ } | ||
this._model.selection.endCol = end[0]; | ||
this._rectangleRenderer.updateSelection(this._model.selection); | ||
} | ||
@@ -349,0 +354,0 @@ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
5014
579862