Skip to content

Commit

Permalink
Fixed lint errors inside codebase. All were auto-fixable.
Browse files Browse the repository at this point in the history
  • Loading branch information
sronveaux committed Aug 24, 2023
1 parent 0cfbda5 commit 2d46769
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 35 deletions.
1 change: 0 additions & 1 deletion src/WguEventBus.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import Vue from 'vue'

// Vue instance acting as app-wide event-bus
Expand Down
2 changes: 1 addition & 1 deletion src/components/maprecorder/MapRecorderWin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export default {
/**
* The video codecs supported by the browser.
*/
mimeTypes: mimeTypes,
mimeTypes,
/**
* Timer handle for canvas draw callbacks.
*/
Expand Down
2 changes: 1 addition & 1 deletion src/components/measuretool/MeasureWin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default {
// wrap geom into object, otherwise the injection into childs does
// not work. Maybe the OL object does not feel changed for Vue
this.measureGeom = {
geom: geom
geom
};
}
}
Expand Down
5 changes: 2 additions & 3 deletions src/components/measuretool/OlMeasureController.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import DrawInteraction from 'ol/interaction/Draw';
import { unByKey } from 'ol/Observable.js';
import VectorSource from 'ol/source/Vector';
Expand Down Expand Up @@ -45,7 +44,7 @@ export default class OlMeasureController {
this.measureLayer = new VectorLayer({
lid: 'wgu-measure-layer',
displayInLayerList: false,
source: source,
source,
style: new Style({
fill: new Fill({
color: measureConf.fillColor || 'rgba(255, 255, 255, 0.2)'
Expand Down Expand Up @@ -77,7 +76,7 @@ export default class OlMeasureController {
const type = (measureType === 'area' ? 'Polygon' : 'LineString');
const draw = new DrawInteraction({
source: me.source,
type: type,
type,
maxPoints: measureType === 'angle' ? 2 : undefined,
style: new Style({
fill: new Fill({
Expand Down
8 changes: 4 additions & 4 deletions src/components/ol/HoverController.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ export default class HoverController {
me.getWMSFeaturesAsync(map, layer, coordinate, me.pendingRequestsCancelSrc)
.then(function (features) {
featureInfos.push(...features.map((feat) => {
return { layer: layer, feature: feat };
return { layer, feature: feat };
}));
me.displayTooltip(featureInfos, coordinate)
})
Expand All @@ -112,7 +112,7 @@ export default class HoverController {
resetTooltip = false;
const features = me.getVectorFeatures(map, layer, pixel);
featureInfos.push(...features.map((feat) => {
return { layer: layer, feature: feat };
return { layer, feature: feat };
}));
me.displayTooltip(featureInfos, coordinate)
}
Expand Down Expand Up @@ -164,7 +164,7 @@ export default class HoverController {

const request = {
method: 'GET',
url: url,
url,
cancelToken: cancelTokenSrc?.token
};
axios(request)
Expand Down Expand Up @@ -205,7 +205,7 @@ export default class HoverController {
WguEventBus.$emit(me.activeOverlayId + '-update-overlay', false);
};
WguEventBus.$emit(overlayId + '-update-overlay', true, coordinate, {
feature: feature,
feature,
hoverAttribute: hoverAttr
});
me.activeOverlayId = overlayId;
Expand Down
16 changes: 8 additions & 8 deletions src/components/ol/Map.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,11 @@ export default {
mapGeodataDragDop: this.$appConfig.mapGeodataDragDop,
// mapping format string to OL module / class
formatMapping: {
GPX: GPX,
GeoJSON: GeoJSON,
IGC: IGC,
KML: KML,
TopoJSON: TopoJSON
GPX,
GeoJSON,
IGC,
KML,
TopoJSON
},
dragDropLayerCreated: false
}
Expand Down Expand Up @@ -163,12 +163,12 @@ export default {
this.map = new Map({
layers: [],
controls: controls,
interactions: interactions,
controls,
interactions,
view: new View({
center: this.center,
zoom: this.zoom,
projection: projection
projection
})
});
Expand Down
6 changes: 3 additions & 3 deletions src/components/ol/PermalinkController.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export default class PermalinkController {
const key = layer.on('change:visible', () => {
this.onMapChange();
});
this.layerListeners.push({ key: key, layer: layer });
this.layerListeners.push({ key, layer });
});
}

Expand Down Expand Up @@ -284,8 +284,8 @@ export default class PermalinkController {
}
return {
zoom: mapView.getZoom(),
center: center,
extent: extent,
center,
extent,
rotation: mapView.getRotation(),
layers: this.getLayerIds()
};
Expand Down
2 changes: 1 addition & 1 deletion src/components/overviewmap/OverviewMapController.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default class OverviewMapController {

this.overviewMapControl = new OverviewMap({
className: 'ol-overviewmap wgu-overviewmap-ctrl',
target: target,
target,
collapsible: false,
rotateWithView: this.conf.rotateWithView
});
Expand Down
4 changes: 2 additions & 2 deletions src/factory/Layer.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export const LayerFactory = {
...this.getCommonLayerOptions(lConf),
source: new ImageWMS({
url: lConf.url,
params: params,
params,
serverType: lConf.serverType,
ratio: lConf.ratio,
interpolate: lConf.interpolate,
Expand Down Expand Up @@ -151,7 +151,7 @@ export const LayerFactory = {
...this.getCommonLayerOptions(lConf),
source: new TileWmsSource({
url: lConf.url,
params: params,
params,
serverType: lConf.serverType,
tileGrid: lConf.tileGrid,
projection: lConf.projection,
Expand Down
8 changes: 4 additions & 4 deletions src/util/ViewAnimation.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ const PanAnimation = {

view.animate({
center: location,
duration: duration,
duration,
zoom: Math.min(zoom, maxZoom)
}, callback);
}
Expand Down Expand Up @@ -304,7 +304,7 @@ const FlyAnimation = {

view.animate({
center: location,
duration: duration
duration
}, callback);

view.animate({
Expand Down Expand Up @@ -403,13 +403,13 @@ const BounceAnimation =

view.animate({
center: location,
duration: duration,
duration,
easing: this.elastic
}, callback);

view.animate({
zoom: Math.min(zoom, maxZoom),
duration: duration
duration
}, callback);
}
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('layerlist/LayerLegendImage.vue', () => {
legendUrl: 'http://my-image.png'
});

await comp.setProps({ layer: layer });
await comp.setProps({ layer });
expect(vm.legendURL).to.equal('http://my-image.png');
});

Expand All @@ -109,7 +109,7 @@ describe('layerlist/LayerLegendImage.vue', () => {
width: 14
}
});
await comp.setProps({ layer: layer });
await comp.setProps({ layer });
expect(vm.legendURL).to.equal('http://my-image.png?transparent=true&width=14&SCALE=139770566.00717944&language=en');
});

Expand Down
1 change: 0 additions & 1 deletion tests/unit/specs/components/modulecore/MapOverlay.spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import MapOverlay from '@/components/modulecore/MapOverlay'
import { WguEventBus } from '@/WguEventBus'
import OlMap from 'ol/Map';
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/specs/components/ol/Map.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ describe('ol/Map.vue', () => {
let comp;
let vm;
beforeEach(() => {
Vue.prototype.$appConfig = { tileGridDefs: tileGridDefs };
Vue.prototype.$appConfig = { tileGridDefs };
comp = mount(Map, { vuetify });
vm = comp.vm;
});
Expand Down Expand Up @@ -242,7 +242,7 @@ describe('ol/Map.vue', () => {
projectionDefs: [
['EPSG:28992', '+proj=sterea +lat_0=52.15616055555555 +lon_0=5.38763888888889 +k=0.999908 +x_0=155000 +y_0=463000 +ellps=bessel +units=m +towgs84=565.2369,50.0087,465.658,-0.406857330322398,0.350732676542563,-1.8703473836068,4.0812 +no_defs']
],
tileGridDefs: tileGridDefs,
tileGridDefs,
mapLayers: [{
type: 'XYZ',
lid: 'brtachtergrondkaart',
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { shallowMount } from '@vue/test-utils';
import OverviewMapPanel from '@/components/overviewmap/OverviewMapPanel';
import OlMap from 'ol/Map';
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/specs/util/ViewAnimation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ describe('ViewAnimationUtil', () => {
describe('animation type ' + animType, () => {
beforeEach(() => {
Vue.prototype.$appConfig = {
viewAnimation: { type: animType, options: options }
viewAnimation: { type: animType, options }
};
});

Expand Down

0 comments on commit 2d46769

Please sign in to comment.