refactor: Move map default to utils
Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
This commit is contained in:
parent
5131697f3c
commit
d6488a043e
4 changed files with 10 additions and 10 deletions
|
|
@ -1,4 +1,4 @@
|
|||
frappe.provide('frappe.widget.utils');
|
||||
frappe.provide('frappe.utils.utils');
|
||||
|
||||
frappe.ui.form.ControlGeolocation = frappe.ui.form.ControlData.extend({
|
||||
horizontal: false,
|
||||
|
|
|
|||
|
|
@ -1051,6 +1051,14 @@ Object.assign(frappe.utils, {
|
|||
|
||||
return number_system_map[country];
|
||||
},
|
||||
map_defaults: {
|
||||
center: [19.0800, 72.8961],
|
||||
zoom: 13,
|
||||
tiles: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
// Array de duplicate
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* frappe.views.MapView
|
||||
*/
|
||||
frappe.provide('frappe.widget.utils');
|
||||
frappe.provide('frappe.utils.utils');
|
||||
frappe.provide("frappe.views");
|
||||
|
||||
frappe.views.MapView = class MapView extends frappe.views.ListView {
|
||||
|
|
|
|||
|
|
@ -21,12 +21,4 @@ frappe.widget.utils = {
|
|||
}</span><h1 class="summary-value">${value}</h1></div>`
|
||||
);
|
||||
},
|
||||
map_defaults: {
|
||||
center: [19.0800, 72.8961],
|
||||
zoom: 13,
|
||||
tiles: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
|
||||
options: {
|
||||
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
|
||||
}
|
||||
},
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue