chore: prettier

This commit is contained in:
Yohan Boniface 2024-02-13 12:10:47 +01:00
parent 6c38a063fd
commit 59cb10342b

View file

@ -58,62 +58,62 @@ L.Map.mergeOptions({
U.Map = L.Map.extend({ U.Map = L.Map.extend({
includes: [ControlsMixin], includes: [ControlsMixin],
editableOptions: { editableOptions: {
'zoom': undefined, zoom: undefined,
'scrollWheelZoom': Boolean, scrollWheelZoom: Boolean,
'scaleControl': Boolean, scaleControl: Boolean,
'moreControl': Boolean, moreControl: Boolean,
'miniMap': Boolean, miniMap: Boolean,
'displayPopupFooter': undefined, displayPopupFooter: undefined,
'onLoadPanel': String, onLoadPanel: String,
'defaultView': String, defaultView: String,
'name': String, name: String,
'description': String, description: String,
'licence': undefined, licence: undefined,
'tilelayer': undefined, tilelayer: undefined,
'overlay': undefined, overlay: undefined,
'limitBounds': undefined, limitBounds: undefined,
'color': String, color: String,
'iconClass': String, iconClass: String,
'iconUrl': String, iconUrl: String,
'smoothFactor': undefined, smoothFactor: undefined,
'iconOpacity': undefined, iconOpacity: undefined,
'opacity': undefined, opacity: undefined,
'weight': undefined, weight: undefined,
'fill': undefined, fill: undefined,
'fillColor': undefined, fillColor: undefined,
'fillOpacity': undefined, fillOpacity: undefined,
'dashArray': undefined, dashArray: undefined,
'popupShape': String, popupShape: String,
'popupTemplate': String, popupTemplate: String,
'popupContentTemplate': String, popupContentTemplate: String,
'zoomTo': undefined, zoomTo: undefined,
'captionBar': Boolean, captionBar: Boolean,
'captionMenus': Boolean, captionMenus: Boolean,
'slideshow': undefined, slideshow: undefined,
'sortKey': undefined, sortKey: undefined,
'labelKey': undefined, labelKey: undefined,
'filterKey': undefined, filterKey: undefined,
'facetKey': undefined, facetKey: undefined,
'slugKey': undefined, slugKey: undefined,
'showLabel': undefined, showLabel: undefined,
'labelDirection': undefined, labelDirection: undefined,
'labelInteractive': undefined, labelInteractive: undefined,
'outlinkTarget': undefined, outlinkTarget: undefined,
'shortCredit': undefined, shortCredit: undefined,
'longCredit': undefined, longCredit: undefined,
'permanentCredit': undefined, permanentCredit: undefined,
'permanentCreditBackground': undefined, permanentCreditBackground: undefined,
'zoomControl': 'NullableBoolean', zoomControl: 'NullableBoolean',
'datalayersControl': 'NullableBoolean', datalayersControl: 'NullableBoolean',
'searchControl': 'NullableBoolean', searchControl: 'NullableBoolean',
'locateControl': 'NullableBoolean', locateControl: 'NullableBoolean',
'fullscreenControl': 'NullableBoolean', fullscreenControl: 'NullableBoolean',
'editinosmControl': 'NullableBoolean', editinosmControl: 'NullableBoolean',
'embedControl': 'NullableBoolean', embedControl: 'NullableBoolean',
'measureControl': 'NullableBoolean', measureControl: 'NullableBoolean',
'tilelayersControl': 'NullableBoolean', tilelayersControl: 'NullableBoolean',
'starControl': 'NullableBoolean', starControl: 'NullableBoolean',
'easing': undefined, easing: undefined,
}, },
initialize: function (el, geojson) { initialize: function (el, geojson) {
@ -322,7 +322,7 @@ U.Map = L.Map.extend({
} }
}) })
window.onbeforeunload = () => this.editEnabled && this.isDirty || null window.onbeforeunload = () => (this.editEnabled && this.isDirty) || null
this.backup() this.backup()
this.initContextMenu() this.initContextMenu()
this.on('click contextmenu.show', this.closeInplaceToolbar) this.on('click contextmenu.show', this.closeInplaceToolbar)
@ -566,12 +566,7 @@ U.Map = L.Map.extend({
if (key === U.Keys.E && modifierKey && !this.editEnabled) { if (key === U.Keys.E && modifierKey && !this.editEnabled) {
L.DomEvent.stop(e) L.DomEvent.stop(e)
this.enableEdit() this.enableEdit()
} else if ( } else if (key === U.Keys.E && modifierKey && this.editEnabled && !this.isDirty) {
key === U.Keys.E &&
modifierKey &&
this.editEnabled &&
!this.isDirty
) {
L.DomEvent.stop(e) L.DomEvent.stop(e)
this.disableEdit() this.disableEdit()
this.ui.closePanel() this.ui.closePanel()