Keep two digits for the opacity value in layer state

This commit is contained in:
Frederic Junod
2019-01-22 12:47:34 +01:00
parent ab04df8f9d
commit af8a22d34d
3 changed files with 4 additions and 4 deletions

View File

@@ -162,14 +162,14 @@ describe('ol.layer.Layer', function() {
});
it('returns a layerState from the properties values', function() {
layer.setOpacity(0.3);
layer.setOpacity(1 / 3);
layer.setVisible(false);
layer.setMaxResolution(500);
layer.setMinResolution(0.25);
layer.setZIndex(10);
expect(layer.getLayerState()).to.eql({
layer: layer,
opacity: 0.3,
opacity: 0.33,
visible: false,
managed: true,
sourceState: 'ready',