Keep only non graphic props in default properties, to prevent useless redraw
This commit is contained in:
parent
45c1d1c419
commit
9d5ff35636
1 changed files with 5 additions and 6 deletions
|
@ -1293,6 +1293,8 @@ L.U.Map.include({
|
||||||
'options.fill',
|
'options.fill',
|
||||||
'options.fillColor',
|
'options.fillColor',
|
||||||
'options.fillOpacity',
|
'options.fillOpacity',
|
||||||
|
'options.smoothFactor',
|
||||||
|
'options.dashArray',
|
||||||
]
|
]
|
||||||
|
|
||||||
builder = new L.U.FormBuilder(this, shapeOptions, {
|
builder = new L.U.FormBuilder(this, shapeOptions, {
|
||||||
|
@ -1311,8 +1313,6 @@ L.U.Map.include({
|
||||||
|
|
||||||
_editDefaultProperties: function (container) {
|
_editDefaultProperties: function (container) {
|
||||||
const optionsFields = [
|
const optionsFields = [
|
||||||
'options.smoothFactor',
|
|
||||||
'options.dashArray',
|
|
||||||
'options.zoomTo',
|
'options.zoomTo',
|
||||||
['options.easing', { handler: 'Switch', label: L._('Animated transitions') }],
|
['options.easing', { handler: 'Switch', label: L._('Animated transitions') }],
|
||||||
'options.labelKey',
|
'options.labelKey',
|
||||||
|
@ -1359,10 +1359,9 @@ L.U.Map.include({
|
||||||
builder = new L.U.FormBuilder(this, optionsFields, {
|
builder = new L.U.FormBuilder(this, optionsFields, {
|
||||||
callback: function (e) {
|
callback: function (e) {
|
||||||
this.initCaptionBar()
|
this.initCaptionBar()
|
||||||
this.eachDataLayer((datalayer) => {
|
if (e.helper.field === 'options.sortKey') {
|
||||||
if (e.helper.field === 'options.sortKey') datalayer.reindex()
|
this.eachDataLayer((datalayer) => datalayer.reindex())
|
||||||
datalayer.redraw()
|
}
|
||||||
})
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
const defaultProperties = L.DomUtil.createFieldset(
|
const defaultProperties = L.DomUtil.createFieldset(
|
||||||
|
|
Loading…
Reference in a new issue