Cosmetics

This commit is contained in:
Eric van der Vlist 2023-01-20 18:56:53 +01:00
parent 982cb722f7
commit 6e796f88c7
1 changed files with 5 additions and 3 deletions

View File

@ -19,10 +19,11 @@ class ClusterableVectorTileSourceProxy {
this.resolution = resolution;
if (this.extent === undefined || !equals(this.extent, extent)) {
this.extent = extent;
if (target.getProjection() != null) {
const projection = target.getProjection();
if (projection != null) {
this.extentProjected = fromLonLat(
extent.slice(0, 2),
target.getProjection()
projection
).concat(fromLonLat(extent.slice(2), this.projection));
}
}
@ -48,7 +49,6 @@ class ClusterableVectorTileSourceProxy {
this.extentProjected !== undefined
? target.getFeaturesInExtent(this.extentProjected)
: [];
//console.trace();
this.featuresSent = true;
// console.log({
// caller: 'clusterableVectorTileSourceProxy',
@ -80,6 +80,7 @@ class ClusterableVectorTileSourceProxy {
constructor(options: Options) {
const { source } = options;
// @ts-ignore
this.proxy = new Proxy(source, {
get: (target, prop, receiver) => {
let result;
@ -99,6 +100,7 @@ class ClusterableVectorTileSourceProxy {
return result;
},
});
//@ts-ignore
return this.proxy;
}
}