Linting
This commit is contained in:
@@ -84,8 +84,10 @@ export function pushFeatureInBuffer(vertexBuffer, indexBuffer, geojsonFeature, o
|
||||
return;
|
||||
}
|
||||
switch (geojsonFeature.geometry.type) {
|
||||
case "Point":
|
||||
pushPointGeomInBuffer_(vertexBuffer, indexBuffer, geojsonFeature, opt_attributes)
|
||||
case 'Point':
|
||||
pushPointGeomInBuffer_(vertexBuffer, indexBuffer, geojsonFeature, opt_attributes);
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
@@ -94,10 +96,10 @@ const tmpArray_ = [];
|
||||
|
||||
/**
|
||||
* Pushes a quad (two triangles) based on a point geometry
|
||||
* @param vertexBuffer
|
||||
* @param indexBuffer
|
||||
* @param geojsonFeature
|
||||
* @param opt_attributes
|
||||
* @param {import("../../webgl/Buffer").default} vertexBuffer WebGL buffer
|
||||
* @param {import("../../webgl/Buffer").default} indexBuffer WebGL buffer
|
||||
* @param {import("../../format/GeoJSON").GeoJSONFeature} geojsonFeature Feature
|
||||
* @param {Array<string>} [opt_attributes] Custom attributes
|
||||
* @private
|
||||
*/
|
||||
function pushPointGeomInBuffer_(vertexBuffer, indexBuffer, geojsonFeature, opt_attributes) {
|
||||
|
||||
@@ -12,7 +12,6 @@ import ViewHint from '../../ViewHint';
|
||||
import {createEmpty, equals} from '../../extent';
|
||||
import {
|
||||
create as createTransform,
|
||||
reset as resetTransform,
|
||||
makeInverse as makeInverseTransform,
|
||||
multiply as multiplyTransform,
|
||||
apply as applyTransform
|
||||
@@ -350,7 +349,7 @@ class WebGLPointsLayerRenderer extends WebGLLayerRenderer {
|
||||
|
||||
/**
|
||||
* Rebuild internal webgl buffers based on current view extent; costly, should not be called too much
|
||||
* @param {import("../../PluggableMap.js").FrameState} frameState
|
||||
* @param {import("../../PluggableMap").FrameState} frameState Frame state.
|
||||
* @private
|
||||
*/
|
||||
rebuildBuffers_(frameState) {
|
||||
|
||||
@@ -38,8 +38,8 @@ describe('ol.renderer.webgl.Layer', function() {
|
||||
|
||||
it('does nothing if the feature has no geometry', function() {
|
||||
const feature = {
|
||||
type: "Feature",
|
||||
id: "AFG",
|
||||
type: 'Feature',
|
||||
id: 'AFG',
|
||||
properties: {
|
||||
color: [0.5, 1, 0.2, 0.7],
|
||||
size: 3
|
||||
@@ -53,14 +53,14 @@ describe('ol.renderer.webgl.Layer', function() {
|
||||
|
||||
it('adds two triangles with the correct attributes for a point geometry', function() {
|
||||
const feature = {
|
||||
type: "Feature",
|
||||
id: "AFG",
|
||||
type: 'Feature',
|
||||
id: 'AFG',
|
||||
properties: {
|
||||
color: [0.5, 1, 0.2, 0.7],
|
||||
size: 3
|
||||
},
|
||||
geometry: {
|
||||
type: "Point",
|
||||
type: 'Point',
|
||||
coordinates: [-75, 47]
|
||||
}
|
||||
};
|
||||
@@ -72,14 +72,14 @@ describe('ol.renderer.webgl.Layer', function() {
|
||||
|
||||
it('correctly sets indices & coordinates for several features', function() {
|
||||
const feature = {
|
||||
type: "Feature",
|
||||
id: "AFG",
|
||||
type: 'Feature',
|
||||
id: 'AFG',
|
||||
properties: {
|
||||
color: [0.5, 1, 0.2, 0.7],
|
||||
size: 3
|
||||
},
|
||||
geometry: {
|
||||
type: "Point",
|
||||
type: 'Point',
|
||||
coordinates: [-75, 47]
|
||||
}
|
||||
};
|
||||
@@ -110,8 +110,8 @@ describe('ol.renderer.webgl.Layer', function() {
|
||||
|
||||
it('correctly adds custom attributes', function() {
|
||||
const feature = {
|
||||
type: "Feature",
|
||||
id: "AFG",
|
||||
type: 'Feature',
|
||||
id: 'AFG',
|
||||
properties: {
|
||||
color: [0.5, 1, 0.2, 0.7],
|
||||
custom: 4,
|
||||
@@ -120,7 +120,7 @@ describe('ol.renderer.webgl.Layer', function() {
|
||||
customString2: 'abc'
|
||||
},
|
||||
geometry: {
|
||||
type: "Point",
|
||||
type: 'Point',
|
||||
coordinates: [-75, 47]
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import WebGLHelper from '../../../../src/ol/webgl/Helper';
|
||||
import {
|
||||
create as createTransform,
|
||||
multiply,
|
||||
rotate as rotateTransform,
|
||||
scale as scaleTransform, translate as translateTransform
|
||||
} from '../../../../src/ol/transform';
|
||||
@@ -203,7 +202,7 @@ describe('ol.webgl.WebGLHelper', function() {
|
||||
resolution: 2,
|
||||
center: [10, 20]
|
||||
}
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
it('gives out the correct transform', function() {
|
||||
|
||||
Reference in New Issue
Block a user