mirror of
https://github.com/umap-project/umap.git
synced 2025-04-28 19:42:36 +02:00
wip: rename labelSize to labelImportance
This commit is contained in:
parent
457338f10a
commit
d630f8dadc
6 changed files with 18 additions and 18 deletions
|
@ -312,7 +312,7 @@ class Feature {
|
|||
'properties._umap_options.showLabel',
|
||||
'properties._umap_options.labelDirection',
|
||||
'properties._umap_options.labelInteractive',
|
||||
'properties._umap_options.labelSize',
|
||||
'properties._umap_options.labelImportance',
|
||||
'properties._umap_options.outlink',
|
||||
'properties._umap_options.outlinkTarget',
|
||||
]
|
||||
|
|
|
@ -697,7 +697,7 @@ export class DataLayer {
|
|||
'options.showLabel',
|
||||
'options.labelDirection',
|
||||
'options.labelInteractive',
|
||||
'options.labelSize',
|
||||
'options.labelImportance',
|
||||
'options.outlinkTarget',
|
||||
'options.interactive',
|
||||
]
|
||||
|
|
|
@ -69,12 +69,12 @@ const FeatureMixin = {
|
|||
const displayName = this.feature.getDisplayName(null)
|
||||
let showLabel = this.feature.getOption('showLabel')
|
||||
const oldLabelHover = this.feature.getOption('labelHover')
|
||||
const size = this.feature.getOption('labelSize')
|
||||
const importance = this.feature.getOption('labelImportance')
|
||||
|
||||
const options = {
|
||||
direction: this.feature.getOption('labelDirection'),
|
||||
interactive: this.feature.getOption('labelInteractive'),
|
||||
className: `leaflet-tooltip-${size}`,
|
||||
className: `leaflet-tooltip-${importance}`,
|
||||
}
|
||||
|
||||
if (oldLabelHover && showLabel) showLabel = null // Retrocompat.
|
||||
|
|
|
@ -250,6 +250,18 @@ export const SCHEMA = {
|
|||
],
|
||||
default: 'auto',
|
||||
},
|
||||
labelImportance: {
|
||||
type: String,
|
||||
impacts: ['data'],
|
||||
label: translate('Label importance'),
|
||||
inheritable: true,
|
||||
choices: [
|
||||
['low', translate('Default')],
|
||||
['medium', translate('Medium')],
|
||||
['high', translate('High')],
|
||||
],
|
||||
default: 'low',
|
||||
},
|
||||
labelInteractive: {
|
||||
type: Boolean,
|
||||
impacts: ['data'],
|
||||
|
@ -264,18 +276,6 @@ export const SCHEMA = {
|
|||
label: translate('Label key'),
|
||||
inheritable: true,
|
||||
},
|
||||
labelSize: {
|
||||
type: String,
|
||||
impacts: ['data'],
|
||||
label: translate('Label font size'),
|
||||
inheritable: true,
|
||||
choices: [
|
||||
['default', translate('Default')],
|
||||
['medium', translate('Medium')],
|
||||
['big', translate('Big')],
|
||||
],
|
||||
default: 'default',
|
||||
},
|
||||
licence: {
|
||||
type: String,
|
||||
impacts: ['ui'],
|
||||
|
|
|
@ -1260,7 +1260,7 @@ U.Map = L.Map.extend({
|
|||
'options.showLabel',
|
||||
'options.labelDirection',
|
||||
'options.labelInteractive',
|
||||
'options.labelSize',
|
||||
'options.labelImportance',
|
||||
'options.outlinkTarget',
|
||||
]
|
||||
builder = new U.FormBuilder(this, popupFields)
|
||||
|
|
|
@ -1188,7 +1188,7 @@ span.popup-icon {
|
|||
.leaflet-tooltip-medium {
|
||||
font-weight: bold;
|
||||
}
|
||||
.leaflet-tooltip-big {
|
||||
.leaflet-tooltip-high {
|
||||
font-weight: bold;
|
||||
font-size: 1.2rem;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue