Allow custom properties in the constructor using the properties option

This commit is contained in:
Andreas Hocevar
2021-05-24 23:23:51 +02:00
parent 7511d9c324
commit 432bd7f851
13 changed files with 27 additions and 0 deletions
+10
View File
@@ -105,6 +105,16 @@ describe('ol.layer.Layer', function () {
layer.dispose();
});
it('assigns key-value pairs of `properties` to the object', function () {
const o = new Layer({
properties: {
foo: 'bar',
},
});
expect(o.get('foo')).to.be('bar');
expect(o.get('properties')).to.be(undefined);
});
it('throws on non-numeric opacity', function () {
function create() {
new Layer({