Run tslint on all of source (for good this time)
This commit is contained in:
+1
-1
@@ -78,7 +78,7 @@
|
|||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "node demo/app",
|
"start": "node demo/app",
|
||||||
"start-zmodem": "node demo/zmodem/app",
|
"start-zmodem": "node demo/zmodem/app",
|
||||||
"lint": "tslint src/*.ts src/**/*.ts src/addons/**/*.ts",
|
"lint": "tslint 'src/**/*.ts'",
|
||||||
"test": "npm-run-all mocha lint",
|
"test": "npm-run-all mocha lint",
|
||||||
"mocha": "gulp test",
|
"mocha": "gulp test",
|
||||||
"build:docs": "jsdoc -c jsdoc.json",
|
"build:docs": "jsdoc -c jsdoc.json",
|
||||||
|
|||||||
@@ -35,15 +35,14 @@ export function acquireCharAtlas(terminal: ITerminal, colors: IColorSet, scaledC
|
|||||||
if (ownedByIndex >= 0) {
|
if (ownedByIndex >= 0) {
|
||||||
if (configEquals(entry.config, newConfig)) {
|
if (configEquals(entry.config, newConfig)) {
|
||||||
return entry.bitmap;
|
return entry.bitmap;
|
||||||
} else {
|
|
||||||
// The configs differ, release the terminal from the entry
|
|
||||||
if (entry.ownedBy.length === 1) {
|
|
||||||
charAtlasCache.splice(i, 1);
|
|
||||||
} else {
|
|
||||||
entry.ownedBy.splice(ownedByIndex, 1);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
// The configs differ, release the terminal from the entry
|
||||||
|
if (entry.ownedBy.length === 1) {
|
||||||
|
charAtlasCache.splice(i, 1);
|
||||||
|
} else {
|
||||||
|
entry.ownedBy.splice(ownedByIndex, 1);
|
||||||
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,10 +91,9 @@ export function generateCharAtlas(context: Window, canvasFactory: (width: number
|
|||||||
if (canvas instanceof HTMLCanvasElement) {
|
if (canvas instanceof HTMLCanvasElement) {
|
||||||
// Just return the HTMLCanvas if it's a HTMLCanvasElement
|
// Just return the HTMLCanvas if it's a HTMLCanvasElement
|
||||||
return canvas;
|
return canvas;
|
||||||
} else {
|
|
||||||
// Transfer to an ImageBitmap is this is an OffscreenCanvas
|
|
||||||
return new Promise(r => r(canvas.transferToImageBitmap()));
|
|
||||||
}
|
}
|
||||||
|
// Transfer to an ImageBitmap is this is an OffscreenCanvas
|
||||||
|
return new Promise(r => r(canvas.transferToImageBitmap()));
|
||||||
}
|
}
|
||||||
|
|
||||||
const charAtlasImageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
|
const charAtlasImageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
|
||||||
|
|||||||
Reference in New Issue
Block a user