xterm-addon-webgl
Advanced tools
Comparing version 0.12.0-beta.9 to 0.12.0-beta.10
@@ -296,2 +296,15 @@ "use strict"; | ||
} | ||
if (chars === '_' && !this._config.allowTransparency) { | ||
var isBeyondCellBounds = clearColor(this._tmpCtx.getImageData(padding, padding, this._config.scaledCellWidth, this._config.scaledCellHeight), backgroundColor); | ||
if (isBeyondCellBounds) { | ||
for (var offset = 1; offset <= 5; offset++) { | ||
this._tmpCtx.clearRect(0, 0, this._tmpCanvas.width, this._tmpCanvas.height); | ||
this._tmpCtx.fillText(chars, padding, padding + this._config.scaledCharHeight - offset); | ||
isBeyondCellBounds = clearColor(this._tmpCtx.getImageData(padding, padding, this._config.scaledCellWidth, this._config.scaledCellHeight), backgroundColor); | ||
if (!isBeyondCellBounds) { | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
if (underline || strikethrough) { | ||
@@ -298,0 +311,0 @@ var lineWidth = Math.max(1, Math.floor(this._config.fontSize / 10)); |
{ | ||
"name": "xterm-addon-webgl", | ||
"version": "0.12.0-beta.9", | ||
"version": "0.12.0-beta.10", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "The xterm.js authors", |
@@ -405,2 +405,18 @@ /** | ||
// If this charcater is underscore and beyond the cell bounds, shift it up until it is visible, | ||
// try for a maximum of 5 pixels. | ||
if (chars === '_' && !this._config.allowTransparency) { | ||
let isBeyondCellBounds = clearColor(this._tmpCtx.getImageData(padding, padding, this._config.scaledCellWidth, this._config.scaledCellHeight), backgroundColor); | ||
if (isBeyondCellBounds) { | ||
for (let offset = 1; offset <= 5; offset++) { | ||
this._tmpCtx.clearRect(0, 0, this._tmpCanvas.width, this._tmpCanvas.height); | ||
this._tmpCtx.fillText(chars, padding, padding + this._config.scaledCharHeight - offset); | ||
isBeyondCellBounds = clearColor(this._tmpCtx.getImageData(padding, padding, this._config.scaledCellWidth, this._config.scaledCellHeight), backgroundColor); | ||
if (!isBeyondCellBounds) { | ||
break; | ||
} | ||
} | ||
} | ||
} | ||
// Draw underline and strikethrough | ||
@@ -407,0 +423,0 @@ if (underline || strikethrough) { |
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
683350
5442