Use blocked scoped variables

In addition to using const and let, this also upgrades our linter config and removes lint (mostly whitespace).
This commit is contained in:
Tim Schaub
2018-01-11 23:32:36 -07:00
parent 0bf2b04dee
commit ad62739a6e
684 changed files with 18120 additions and 18184 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
/**
* @module ol/render/webgl
*/
var _ol_render_webgl_ = {};
const _ol_render_webgl_ = {};
/**
@@ -90,7 +90,7 @@ _ol_render_webgl_.defaultLineWidth = 1;
* @return {boolean|undefined} Triangle is clockwise.
*/
_ol_render_webgl_.triangleIsCounterClockwise = function(x1, y1, x2, y2, x3, y3) {
var area = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);
const area = (x2 - x1) * (y3 - y1) - (x3 - x1) * (y2 - y1);
return (area <= _ol_render_webgl_.EPSILON && area >= -_ol_render_webgl_.EPSILON) ?
undefined : area > 0;
};