Make outlink and outlinkTarget available for each feature

It was only for polygon until then.

cf #323
This commit is contained in:
Yohan Boniface 2023-06-21 12:00:34 +02:00
parent bbf4b72e07
commit 2a04af162a
2 changed files with 13 additions and 13 deletions

View file

@ -173,6 +173,8 @@ L.U.FeatureMixin = {
'properties._umap_options.showLabel', 'properties._umap_options.showLabel',
'properties._umap_options.labelDirection', 'properties._umap_options.labelDirection',
'properties._umap_options.labelInteractive', 'properties._umap_options.labelInteractive',
'properties._umap_options.outlink',
'properties._umap_options.outlinkTarget',
] ]
}, },
@ -1045,19 +1047,6 @@ L.U.Polygon = L.Polygon.extend({
inheritable: true, inheritable: true,
}, },
], ],
[
'properties._umap_options.outlink',
{
label: L._('Link to…'),
helpEntries: 'outlink',
placeholder: 'http://...',
inheritable: true,
},
],
[
'properties._umap_options.outlinkTarget',
{ handler: 'OutlinkTarget', label: L._('Open link in…'), inheritable: true },
],
] ]
return options.concat(L.U.FeatureMixin.getInteractionOptions()) return options.concat(L.U.FeatureMixin.getInteractionOptions())
}, },

View file

@ -1045,6 +1045,17 @@ L.U.FormBuilder = L.FormBuilder.extend({
label: L._('Labels are clickable'), label: L._('Labels are clickable'),
inheritable: true, inheritable: true,
}, },
outlink: {
label: L._('Link to…'),
helpEntries: 'outlink',
placeholder: 'http://...',
inheritable: true,
},
outlinkTarget: {
handler: 'OutlinkTarget',
label: L._('Open link in…'),
inheritable: true,
},
labelKey: { labelKey: {
helpEntries: 'labelKey', helpEntries: 'labelKey',
placeholder: L._('Default: name'), placeholder: L._('Default: name'),