Recover from skip feature removal regressions

This commit is contained in:
Andreas Hocevar
2019-09-26 16:56:38 +02:00
parent 1e93ede0b2
commit 838edfa369
2 changed files with 4 additions and 4 deletions

View File

@@ -556,7 +556,9 @@ class Executor extends Disposable {
switch (type) {
case CanvasInstruction.BEGIN_GEOMETRY:
feature = /** @type {import("../../Feature.js").FeatureLike} */ (instruction[1]);
if (opt_hitExtent !== undefined && !intersects(opt_hitExtent, instruction[3])) {
if (!feature.getGeometry()) {
i = /** @type {number} */ (instruction[2]);
} else if (opt_hitExtent !== undefined && !intersects(opt_hitExtent, instruction[3])) {
i = /** @type {number} */ (instruction[2]) + 1;
} else {
++i;

View File

@@ -97,9 +97,7 @@ class MapRenderer extends Disposable {
* @return {?} Callback result.
*/
function forEachFeatureAtCoordinate(managed, feature, layer) {
if (managed) {
return callback.call(thisArg, feature, layer);
}
return callback.call(thisArg, feature, managed ? layer : null);
}
const projection = viewState.projection;