fix: add a label for default colors scheme in categorized layer type

This commit is contained in:
Yohan Boniface 2025-01-24 18:22:33 +01:00
parent 609b251303
commit 8111cf5522

View file

@ -88,7 +88,11 @@ const ClassifiedMixin = {
},
getColorSchemes: function (classes) {
return this.colorSchemes.filter((scheme) => Boolean(colorbrewer[scheme][classes]))
const found = this.colorSchemes.filter((scheme) =>
Boolean(colorbrewer[scheme][classes])
)
if (found.length) return found
return [['', translate('Default')]]
},
}