xterm-addon-webgl
Advanced tools
Comparing version
{ | ||
"name": "xterm-addon-webgl", | ||
"version": "0.12.0-beta.25", | ||
"version": "0.12.0-beta.26", | ||
"author": { | ||
@@ -5,0 +5,0 @@ "name": "The xterm.js authors", |
@@ -31,6 +31,6 @@ /** | ||
return { | ||
customGlyphs: terminal.getOption('customGlyphs'), | ||
customGlyphs: terminal.options.customGlyphs!, | ||
devicePixelRatio: window.devicePixelRatio, | ||
letterSpacing: terminal.getOption('letterSpacing'), | ||
lineHeight: terminal.getOption('lineHeight'), | ||
letterSpacing: terminal.options.letterSpacing!, | ||
lineHeight: terminal.options.lineHeight!, | ||
scaledCellWidth, | ||
@@ -40,9 +40,9 @@ scaledCellHeight, | ||
scaledCharHeight, | ||
fontFamily: terminal.getOption('fontFamily'), | ||
fontSize: terminal.getOption('fontSize'), | ||
fontWeight: terminal.getOption('fontWeight') as FontWeight, | ||
fontWeightBold: terminal.getOption('fontWeightBold') as FontWeight, | ||
allowTransparency: terminal.getOption('allowTransparency'), | ||
drawBoldTextInBrightColors: terminal.getOption('drawBoldTextInBrightColors'), | ||
minimumContrastRatio: terminal.getOption('minimumContrastRatio'), | ||
fontFamily: terminal.options.fontFamily!, | ||
fontSize: terminal.options.fontSize!, | ||
fontWeight: terminal.options.fontWeight as FontWeight, | ||
fontWeightBold: terminal.options.fontWeightBold as FontWeight, | ||
allowTransparency: terminal.options.allowTransparency!, | ||
drawBoldTextInBrightColors: terminal.options.drawBoldTextInBrightColors!, | ||
minimumContrastRatio: terminal.options.minimumContrastRatio!, | ||
colors: clonedColors | ||
@@ -49,0 +49,0 @@ }; |
@@ -257,8 +257,8 @@ /** | ||
protected _getFont(terminal: Terminal, isBold: boolean, isItalic: boolean): string { | ||
const fontWeight = isBold ? terminal.getOption('fontWeightBold') : terminal.getOption('fontWeight'); | ||
const fontWeight = isBold ? terminal.options.fontWeightBold : terminal.options.fontWeight; | ||
const fontStyle = isItalic ? 'italic' : ''; | ||
return `${fontStyle} ${fontWeight} ${terminal.getOption('fontSize') * window.devicePixelRatio}px ${terminal.getOption('fontFamily')}`; | ||
return `${fontStyle} ${fontWeight} ${terminal.options.fontSize! * window.devicePixelRatio}px ${terminal.options.fontFamily}`; | ||
} | ||
} | ||
@@ -86,3 +86,3 @@ /** | ||
public onOptionsChanged(terminal: Terminal): void { | ||
if (terminal.getOption('cursorBlink')) { | ||
if (terminal.options.cursorBlink) { | ||
if (!this._cursorBlinkStateManager) { | ||
@@ -144,3 +144,3 @@ this._cursorBlinkStateManager = new CursorBlinkStateManager(terminal, () => { | ||
this._ctx.fillStyle = this._colors.cursor.css; | ||
const cursorStyle = terminal.getOption('cursorStyle'); | ||
const cursorStyle = terminal.options.cursorStyle; | ||
if (cursorStyle && cursorStyle !== 'block') { | ||
@@ -155,3 +155,3 @@ this._cursorRenderers[cursorStyle](terminal, cursorX, viewportRelativeCursorY, this._cell); | ||
this._state.isFocused = false; | ||
this._state.style = cursorStyle; | ||
this._state.style = cursorStyle!; | ||
this._state.width = this._cell.getWidth(); | ||
@@ -172,3 +172,3 @@ return; | ||
this._state.isFocused === isTerminalFocused(terminal) && | ||
this._state.style === terminal.getOption('cursorStyle') && | ||
this._state.style === terminal.options.cursorStyle && | ||
this._state.width === this._cell.getWidth()) { | ||
@@ -181,3 +181,3 @@ return; | ||
this._ctx.save(); | ||
this._cursorRenderers[terminal.getOption('cursorStyle') || 'block'](terminal, cursorX, viewportRelativeCursorY, this._cell); | ||
this._cursorRenderers[terminal.options.cursorStyle || 'block'](terminal, cursorX, viewportRelativeCursorY, this._cell); | ||
this._ctx.restore(); | ||
@@ -188,3 +188,3 @@ | ||
this._state.isFocused = false; | ||
this._state.style = terminal.getOption('cursorStyle'); | ||
this._state.style = terminal.options.cursorStyle!; | ||
this._state.width = this._cell.getWidth(); | ||
@@ -214,3 +214,3 @@ } | ||
this._ctx.fillStyle = this._colors.cursor.css; | ||
this._fillLeftLineAtCell(x, y, terminal.getOption('cursorWidth')); | ||
this._fillLeftLineAtCell(x, y, terminal.options.cursorWidth!); | ||
this._ctx.restore(); | ||
@@ -217,0 +217,0 @@ } |
@@ -443,14 +443,14 @@ /** | ||
// scaled char height. | ||
this.dimensions.scaledCellHeight = Math.floor(this.dimensions.scaledCharHeight * this._terminal.getOption('lineHeight')); | ||
this.dimensions.scaledCellHeight = Math.floor(this.dimensions.scaledCharHeight * this._terminal.options.lineHeight!); | ||
// Calculate the y coordinate within a cell that text should draw from in | ||
// order to draw in the center of a cell. | ||
this.dimensions.scaledCharTop = this._terminal.getOption('lineHeight') === 1 ? 0 : Math.round((this.dimensions.scaledCellHeight - this.dimensions.scaledCharHeight) / 2); | ||
this.dimensions.scaledCharTop = this._terminal.options.lineHeight === 1 ? 0 : Math.round((this.dimensions.scaledCellHeight - this.dimensions.scaledCharHeight) / 2); | ||
// Calculate the scaled cell width, taking the letterSpacing into account. | ||
this.dimensions.scaledCellWidth = this.dimensions.scaledCharWidth + Math.round(this._terminal.getOption('letterSpacing')); | ||
this.dimensions.scaledCellWidth = this.dimensions.scaledCharWidth + Math.round(this._terminal.options.letterSpacing!); | ||
// Calculate the x coordinate with a cell that text should draw from in | ||
// order to draw in the center of a cell. | ||
this.dimensions.scaledCharLeft = Math.floor(this._terminal.getOption('letterSpacing') / 2); | ||
this.dimensions.scaledCharLeft = Math.floor(this._terminal.options.letterSpacing! / 2); | ||
@@ -457,0 +457,0 @@ // Recalculate the canvas dimensions; scaled* define the actual number of |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
483149
-0.06%3112
-0.03%