Compare commits
2
Commits
image_resizing
...
3.4.1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
536425394c | ||
|
|
fe576b895c |
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "xterm",
|
"name": "xterm",
|
||||||
"description": "Full xterm terminal, in your browser",
|
"description": "Full xterm terminal, in your browser",
|
||||||
"version": "3.4.0",
|
"version": "3.4.1",
|
||||||
"main": "lib/Terminal.js",
|
"main": "lib/Terminal.js",
|
||||||
"types": "typings/xterm.d.ts",
|
"types": "typings/xterm.d.ts",
|
||||||
"repository": "https://github.com/xtermjs/xterm.js",
|
"repository": "https://github.com/xtermjs/xterm.js",
|
||||||
|
|||||||
@@ -19,6 +19,10 @@ export default class StaticCharAtlas extends BaseCharAtlas {
|
|||||||
const canvas = this._document.createElement('canvas');
|
const canvas = this._document.createElement('canvas');
|
||||||
canvas.width = width;
|
canvas.width = width;
|
||||||
canvas.height = height;
|
canvas.height = height;
|
||||||
|
|
||||||
|
// This is useful for debugging
|
||||||
|
// document.body.appendChild(canvas);
|
||||||
|
|
||||||
return canvas;
|
return canvas;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -65,6 +69,9 @@ export default class StaticCharAtlas extends BaseCharAtlas {
|
|||||||
if (!this._isCached(glyph, colorIndex)) {
|
if (!this._isCached(glyph, colorIndex)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx.save();
|
||||||
|
|
||||||
// ImageBitmap's draw about twice as fast as from a canvas
|
// ImageBitmap's draw about twice as fast as from a canvas
|
||||||
const charAtlasCellWidth = this._config.scaledCharWidth + CHAR_ATLAS_CELL_SPACING;
|
const charAtlasCellWidth = this._config.scaledCharWidth + CHAR_ATLAS_CELL_SPACING;
|
||||||
const charAtlasCellHeight = this._config.scaledCharHeight + CHAR_ATLAS_CELL_SPACING;
|
const charAtlasCellHeight = this._config.scaledCharHeight + CHAR_ATLAS_CELL_SPACING;
|
||||||
@@ -86,6 +93,8 @@ export default class StaticCharAtlas extends BaseCharAtlas {
|
|||||||
this._config.scaledCharHeight
|
this._config.scaledCharHeight
|
||||||
);
|
);
|
||||||
|
|
||||||
|
ctx.restore();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user