From 984f83346a54b46f552dd2ceb5481f86efaebdd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Johannes=20Dr=C3=B6nner?= Date: Tue, 21 Jun 2016 11:23:20 +0200 Subject: [PATCH] openlayers: Add filter function for layers in SelectOptions --- openlayers/openlayers-tests.ts | 4 ++++ openlayers/openlayers.d.ts | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/openlayers/openlayers-tests.ts b/openlayers/openlayers-tests.ts index a2152b11ad..39bc7284f2 100644 --- a/openlayers/openlayers-tests.ts +++ b/openlayers/openlayers-tests.ts @@ -546,3 +546,7 @@ var modify: ol.interaction.Modify = new ol.interaction.Modify({ var draw: ol.interaction.Draw = new ol.interaction.Draw({ type: "Point" }) + +const select: ol.interaction.Select = new ol.interaction.Select({ + layers: (layer: ol.layer.Layer) => true; +}); diff --git a/openlayers/openlayers.d.ts b/openlayers/openlayers.d.ts index d1ec613314..5ab387be4e 100644 --- a/openlayers/openlayers.d.ts +++ b/openlayers/openlayers.d.ts @@ -552,12 +552,12 @@ declare namespace olx { interface SelectOptions { addCondition?: ol.events.ConditionType; condition?: ol.events.ConditionType; - layers?: Array; + layers?: Array | ((layer: ol.layer.Layer) => boolean); style?: ol.style.Style | Array | ol.style.StyleFunction; removeCondition?: ol.events.ConditionType; toggleCondition?: ol.events.ConditionType; multi?: boolean; - features?: ol.Collection + features?: ol.Collection; filter?: ol.interaction.SelectFilterFunction; wrapX?: boolean; }