reset slider on page load to minimum opacity, fixes #22
This commit is contained in:
parent
327c343903
commit
2b6be76cc4
2 changed files with 9 additions and 1 deletions
|
|
@ -8,7 +8,12 @@ BR.OpacitySlider = L.Control.extend({
|
|||
var container = L.DomUtil.create('div', 'leaflet-bar control-slider'),
|
||||
input = $('<input id="slider" type="text"/>'),
|
||||
item = localStorage.opacitySliderValue,
|
||||
value = item ? parseInt(item) : 100;
|
||||
value = item ? parseInt(item) : 100,
|
||||
minOpacity = (BR.conf.minOpacity || 0) * 100;
|
||||
|
||||
if (value < minOpacity) {
|
||||
value = minOpacity;
|
||||
}
|
||||
|
||||
var stopClickAfterSlide = function(evt) {
|
||||
L.DomEvent.stop(evt);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue