fix direct-image-filters output and add test for image-filters
This commit is contained in:
parent
c1d750a246
commit
922740da5a
@ -39,7 +39,7 @@ tree.StyleXML = function(name, attachment, definitions, env) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (direct_image_filters.length) {
|
if (direct_image_filters.length) {
|
||||||
attrs_xml += ' direct-image-filters="' + _.chain(image_filters)
|
attrs_xml += ' direct-image-filters="' + _.chain(direct_image_filters)
|
||||||
// prevent identical filters from being duplicated in the style
|
// prevent identical filters from being duplicated in the style
|
||||||
.uniq(function(i) { return i.id; }).map(function(f) {
|
.uniq(function(i) { return i.id; }).map(function(f) {
|
||||||
return f.ev(env).toXML(env, true, ',', 'direct-image-filter');
|
return f.ev(env).toXML(env, true, ',', 'direct-image-filter');
|
||||||
|
4
test/rendering-mss/image-filters.mss
Normal file
4
test/rendering-mss/image-filters.mss
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
#layer {
|
||||||
|
image-filters:invert();
|
||||||
|
direct-image-filters:invert();
|
||||||
|
}
|
2
test/rendering-mss/image-filters.xml
Normal file
2
test/rendering-mss/image-filters.xml
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
<Style name="style" filter-mode="first" image-filters="invert" direct-image-filters="invert">
|
||||||
|
</Style>
|
Loading…
Reference in New Issue
Block a user