mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
chore: use datalayer.allProperties() instead of private property
This commit is contained in:
parent
29d70552dd
commit
609b251303
3 changed files with 6 additions and 6 deletions
|
@ -236,7 +236,7 @@ class Feature {
|
|||
|
||||
const properties = []
|
||||
let labelKeyFound = undefined
|
||||
for (const property of this.datalayer._propertiesIndex) {
|
||||
for (const property of this.datalayer.allProperties()) {
|
||||
if (!labelKeyFound && U.LABEL_KEYS.includes(property)) {
|
||||
labelKeyFound = property
|
||||
continue
|
||||
|
|
|
@ -191,7 +191,7 @@ export const Choropleth = FeatureGroup.extend({
|
|||
'options.choropleth.property',
|
||||
{
|
||||
handler: 'Select',
|
||||
selectOptions: this.datalayer._propertiesIndex,
|
||||
selectOptions: this.datalayer.allProperties(),
|
||||
label: translate('Choropleth property value'),
|
||||
},
|
||||
],
|
||||
|
@ -300,7 +300,7 @@ export const Circles = FeatureGroup.extend({
|
|||
'options.circles.property',
|
||||
{
|
||||
handler: 'Select',
|
||||
selectOptions: this.datalayer._propertiesIndex,
|
||||
selectOptions: this.datalayer.allProperties(),
|
||||
label: translate('Property name to compute circles'),
|
||||
},
|
||||
],
|
||||
|
@ -377,7 +377,7 @@ export const Categorized = FeatureGroup.extend({
|
|||
|
||||
_getValue: function (feature) {
|
||||
const key =
|
||||
this.datalayer.options.categorized.property || this.datalayer._propertiesIndex[0]
|
||||
this.datalayer.options.categorized.property || this.datalayer.allProperties()[0]
|
||||
return feature.properties[key]
|
||||
},
|
||||
|
||||
|
@ -430,7 +430,7 @@ export const Categorized = FeatureGroup.extend({
|
|||
'options.categorized.property',
|
||||
{
|
||||
handler: 'Select',
|
||||
selectOptions: this.datalayer._propertiesIndex,
|
||||
selectOptions: this.datalayer.allProperties(),
|
||||
label: translate('Category property'),
|
||||
},
|
||||
],
|
||||
|
|
|
@ -104,7 +104,7 @@ export default class TableEditor extends WithTemplate {
|
|||
}
|
||||
|
||||
resetProperties() {
|
||||
this.properties = this.datalayer._propertiesIndex
|
||||
this.properties = this.datalayer.allProperties()
|
||||
if (this.properties.length === 0) {
|
||||
this.properties = [U.DEFAULT_LABEL_KEY, 'description']
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue