refactor: Move map default to utils

Signed-off-by: mathieu.brunot <mathieu.brunot@monogramm.io>
This commit is contained in:
mathieu.brunot 2020-12-24 13:59:02 +01:00
parent 5131697f3c
commit d6488a043e
No known key found for this signature in database
GPG key ID: 81584BEAF692D7E0
4 changed files with 10 additions and 10 deletions

View file

@ -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,

View file

@ -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: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}
},
});
// Array de duplicate

View file

@ -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 {

View file

@ -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: '&copy; <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}
},
};