Fix some cosmetics on Select interaction

This commit is contained in:
Tobias Kohr
2019-09-25 17:34:26 +02:00
parent a493ff7e93
commit 347f5df32e
3 changed files with 6 additions and 4 deletions

View File

@@ -275,6 +275,10 @@ The `ol/source/Vector#refresh()` method now removes all features from the source
The `getGetFeatureInfoUrl` of `ol/source/ImageWMS` and `ol/source/TileWMS` is now called `getFeatureInfoUrl`.
##### `getFeaturesAtPixel` always returns an array
`getFeaturesAtPixel` now returns an empty array instead of null if no features were found.
#### Other changes
##### Allow declutter in image render mode

View File

@@ -86,8 +86,6 @@ const SelectEventType = {
* that takes an {@link module:ol/Feature} and an
* {@link module:ol/layer/Layer} and returns `true` if the feature may be
* selected or `false` otherwise.
* @property {boolean} [wrapX=true] Wrap the world horizontally on the selection
* overlay.
* @property {number} [hitTolerance=0] Hit-detection tolerance. Pixels inside
* the radius around the given position will be checked for features.
*/

View File

@@ -223,7 +223,7 @@ describe('ol.interaction.Select', function() {
expect(features.getLength()).to.equal(4);
expect(select.getLayer(features.item(0))).to.equal(layer);
// Select again to make sure the internal layer isn't reported
// Select again to make sure the style change does not break selection
simulateEvent('singleclick', 10, -20);
expect(listenerSpy.callCount).to.be(1);
@@ -362,7 +362,7 @@ describe('ol.interaction.Select', function() {
interaction.on('select', listenerSpy);
simulateEvent('singleclick', 10, -20);
// Select again to make sure that the internal layer doesn't get reported.
// Select again to make sure the style change does not break selection
simulateEvent('singleclick', 10, -20);
});
});