Add getOverlay method to access sketch and selection layers
This commit is contained in:
@@ -1060,6 +1060,13 @@ describe('ol.interaction.Draw', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getOverlay', function() {
|
||||
it('returns the feature overlay layer', function() {
|
||||
const draw = new Draw({});
|
||||
expect (draw.getOverlay()).to.eql(draw.overlay_);
|
||||
});
|
||||
});
|
||||
|
||||
describe('createRegularPolygon', function() {
|
||||
it('creates a regular polygon in Circle mode', function() {
|
||||
const draw = new Draw({
|
||||
|
||||
@@ -712,4 +712,13 @@ describe('ol.interaction.Modify', function() {
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getOverlay', function() {
|
||||
it('returns the feature overlay layer', function() {
|
||||
const modify = new Modify({
|
||||
features: new Collection()
|
||||
});
|
||||
expect (modify.getOverlay()).to.eql(modify.overlay_);
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
@@ -442,4 +442,11 @@ describe('ol.interaction.Select', function() {
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('#getOverlay', function() {
|
||||
it('returns the feature overlay layer', function() {
|
||||
const select = new Select();
|
||||
expect (select.getOverlay()).to.eql(select.featureOverlay_);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user