Enable the object-shorthand ESLint rule in src/display

Please see http://eslint.org/docs/rules/object-shorthand.

For the most part, these changes are of the search-and-replace kind, and the previously enabled `no-undef` rule should complement the tests in helping ensure that no stupid errors crept into to the patch.
This commit is contained in:
Jonas Jenwald 2017-04-25 16:17:18 +02:00
parent 7bee0c2aa3
commit 07b5574006
9 changed files with 69 additions and 66 deletions

View file

@ -169,8 +169,8 @@ var createMeshCanvas = (function createMeshCanvasClosure() {
var scaleY = boundsHeight / height;
var context = {
coords: coords,
colors: colors,
coords,
colors,
offsetX: -offsetX,
offsetY: -offsetY,
scaleX: 1 / scaleX,
@ -212,10 +212,13 @@ var createMeshCanvas = (function createMeshCanvasClosure() {
canvas = tmpCanvas.canvas;
}
return {canvas: canvas,
offsetX: offsetX - BORDER_SIZE * scaleX,
offsetY: offsetY - BORDER_SIZE * scaleY,
scaleX: scaleX, scaleY: scaleY};
return {
canvas,
offsetX: offsetX - BORDER_SIZE * scaleX,
offsetY: offsetY - BORDER_SIZE * scaleY,
scaleX,
scaleY,
};
}
return createMeshCanvas;
})();