default opacity 0.67 (#36)
This commit is contained in:
parent
a54cc31a0f
commit
83ce7ff79a
3 changed files with 6 additions and 3 deletions
|
|
@ -78,6 +78,9 @@
|
||||||
//'Mapsforge Tile Server': 'http://localhost:6090/{z}/{x}/{y}.png'
|
//'Mapsforge Tile Server': 'http://localhost:6090/{z}/{x}/{y}.png'
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Initial route line transparency (0-1, overridden by stored slider setting)
|
||||||
|
BR.conf.defaultOpacity = 0.67;
|
||||||
|
|
||||||
// Minimum transparency slider value on load, values between 0 and 1 (0=invisible).
|
// Minimum transparency slider value on load, values between 0 and 1 (0=invisible).
|
||||||
// 0 = no minimum, use stored setting; 1 = always reset to full visibility on load
|
// 0 = no minimum, use stored setting; 1 = always reset to full visibility on load
|
||||||
BR.conf.minOpacity = 0.3;
|
BR.conf.minOpacity = 0.3;
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ BR.OpacitySlider = L.Control.extend({
|
||||||
var container = L.DomUtil.create('div', 'leaflet-bar control-slider'),
|
var container = L.DomUtil.create('div', 'leaflet-bar control-slider'),
|
||||||
input = $('<input id="slider" type="text"/>'),
|
input = $('<input id="slider" type="text"/>'),
|
||||||
item = localStorage.opacitySliderValue,
|
item = localStorage.opacitySliderValue,
|
||||||
value = item ? parseInt(item) : 100,
|
value = item ? parseInt(item) : BR.conf.defaultOpacity * 100,
|
||||||
minOpacity = (BR.conf.minOpacity || 0) * 100;
|
minOpacity = (BR.conf.minOpacity || 0) * 100;
|
||||||
|
|
||||||
if (value < minOpacity) {
|
if (value < minOpacity) {
|
||||||
|
|
|
||||||
|
|
@ -251,13 +251,13 @@
|
||||||
},
|
},
|
||||||
track: {
|
track: {
|
||||||
color: 'magenta',
|
color: 'magenta',
|
||||||
opacity: 1
|
opacity: BR.conf.defaultOpacity
|
||||||
},
|
},
|
||||||
trackCasing: {
|
trackCasing: {
|
||||||
weight: 8,
|
weight: 8,
|
||||||
color: 'white',
|
color: 'white',
|
||||||
// assumed to be same as track, see setOpacity
|
// assumed to be same as track, see setOpacity
|
||||||
opacity: 1
|
opacity: BR.conf.defaultOpacity
|
||||||
},
|
},
|
||||||
nodata: {
|
nodata: {
|
||||||
color: 'darkred'
|
color: 'darkred'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue