Lint and build in single step
This commit is contained in:
parent
414187c329
commit
1419290e7a
@ -3,8 +3,7 @@
|
|||||||
"version": "0.0.1",
|
"version": "0.0.1",
|
||||||
"description": "BittMapp - A monochrome bitmap editor",
|
"description": "BittMapp - A monochrome bitmap editor",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "tsc",
|
"build": "tslint -c tslint.json \"src/**/*.ts\" && tsc"
|
||||||
"lint": "tslint -c tslint.json \"src/**/*.ts\""
|
|
||||||
},
|
},
|
||||||
"author": "Nathan Kunicki <me@nathankunicki.com>",
|
"author": "Nathan Kunicki <me@nathankunicki.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
@ -72,7 +72,7 @@ class BittMappEditor {
|
|||||||
|
|
||||||
this._context = this.canvas.getContext("2d") as CanvasRenderingContext2D;
|
this._context = this.canvas.getContext("2d") as CanvasRenderingContext2D;
|
||||||
|
|
||||||
const deviceRatio: number = window.devicePixelRatio;
|
const deviceRatio: number = window.devicePixelRatio || 1;
|
||||||
const backingStoreRatio: number = (this._context as any).backingStorePixelRatio as number || 1;
|
const backingStoreRatio: number = (this._context as any).backingStorePixelRatio as number || 1;
|
||||||
|
|
||||||
this._scale = deviceRatio / backingStoreRatio;
|
this._scale = deviceRatio / backingStoreRatio;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user