Add features property to vertex feature

This commit is contained in:
Andreas Hocevar
2020-11-24 22:44:13 +01:00
parent 6874bfaaef
commit ec9dde88f9
2 changed files with 19 additions and 8 deletions

View File

@@ -942,8 +942,8 @@ describe('ol.interaction.Modify', function () {
});
});
describe('#setActive', function () {
it('removes the vertexFeature of deactivation', function () {
describe('Vertex feature', function () {
it('tracks features and removes the vertexFeature on deactivation', function () {
const modify = new Modify({
features: new Collection(features),
});
@@ -952,6 +952,7 @@ describe('ol.interaction.Modify', function () {
simulateEvent('pointermove', 10, -20, null, 0);
expect(modify.vertexFeature_).to.not.be(null);
expect(modify.vertexFeature_.get('features').length).to.be(1);
modify.setActive(false);
expect(modify.vertexFeature_).to.be(null);