Fix opacity handling for tile and vector layers

This commit is contained in:
Andreas Hocevar
2021-09-15 19:18:04 +02:00
parent cb6995d71a
commit 2f5e6906b9
5 changed files with 31 additions and 12 deletions

View File

@@ -1,7 +1,13 @@
import expect from '../expect.js';
import {getFontParameters} from '../../../src/ol/css.js';
import {cssOpacity, getFontParameters} from '../../../src/ol/css.js';
describe('ol.css', function () {
describe('cssOpacity()', function () {
it('converts number to string, 1 to ""', function () {
expect(cssOpacity(0.5)).to.eql('0.5');
expect(cssOpacity(1)).to.eql('');
});
});
describe('getFontParameters()', function () {
const cases = [
{