Closed marcjansen closed 4 years ago
I'm not sure that having the alpha channel in the hexcolor is correct. If you look here: https://geostyler.github.io/geostyler-demo/ or here https://github.com/geostyler/geostyler-style/blob/master/index.d.ts#L115-L123 The alpha part is in an opacity property. Not in the Hex color.
That can be changed in another PR
Thanks for the reviews. I'll merge and then you can go on with the opacity as you think it fits best.
This PR tries to improve typings of the parser methods a bit and adds a bunch of tests.
Since
npm test
currently fails on master due to unrelated things, the tests herein need to be run e.g. withjest -t check
; they all pass locally for me.This also revealed a tiny bug where hexcolors with alpha channel (e.g.
#rrggbbaa
) wouldn't be detected properly. These are allowed according to https://mapserver.org/mapfile/style.html