draw-tools: update edit colour to match that used while drawing - with only dashed lines being used as in stock Leaflet.Draw
This commit is contained in:
parent
924c384ab9
commit
fe1d7fb337
@ -33,6 +33,7 @@ window.plugin.drawTools.loadExternals = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
window.plugin.drawTools.setOptions = function() {
|
window.plugin.drawTools.setOptions = function() {
|
||||||
|
|
||||||
window.plugin.drawTools.lineOptions = {
|
window.plugin.drawTools.lineOptions = {
|
||||||
stroke: true,
|
stroke: true,
|
||||||
color: '#a24ac3',
|
color: '#a24ac3',
|
||||||
@ -42,16 +43,15 @@ window.plugin.drawTools.setOptions = function() {
|
|||||||
clickable: true
|
clickable: true
|
||||||
};
|
};
|
||||||
|
|
||||||
window.plugin.drawTools.polygonOptions = {
|
window.plugin.drawTools.polygonOptions = L.extend({}, window.plugin.drawTools.lineOptions, {
|
||||||
stroke: true,
|
|
||||||
color: '#a24ac3',
|
|
||||||
weight: 4,
|
|
||||||
opacity: 0.5,
|
|
||||||
fill: true,
|
fill: true,
|
||||||
fillColor: null,
|
fillColor: null, // to use the same as 'color' for fill
|
||||||
fillOpacity: 0.2,
|
fillOpacity: 0.2
|
||||||
clickable: true
|
});
|
||||||
};
|
|
||||||
|
window.plugin.drawTools.editOptions = L.extend({}, window.plugin.drawTools.polygonOptions, {
|
||||||
|
dashArray: [10,10]
|
||||||
|
});
|
||||||
|
|
||||||
window.plugin.drawTools.markerOptions = {
|
window.plugin.drawTools.markerOptions = {
|
||||||
icon: new L.Icon.Default(),
|
icon: new L.Icon.Default(),
|
||||||
@ -113,7 +113,8 @@ window.plugin.drawTools.addDrawControl = function() {
|
|||||||
featureGroup: window.plugin.drawTools.drawnItems,
|
featureGroup: window.plugin.drawTools.drawnItems,
|
||||||
|
|
||||||
edit: {
|
edit: {
|
||||||
title: 'Edit drawn items'
|
title: 'Edit drawn items',
|
||||||
|
selectedPathOptions: window.plugin.drawTools.editOptions,
|
||||||
},
|
},
|
||||||
|
|
||||||
remove: {
|
remove: {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user