Skip to content

Commit e8b362e

Browse files
committed
✏️ docs修正
- ✏️ docs修正
1 parent 2c0b26b commit e8b362e

File tree

4 files changed

+6
-4
lines changed

4 files changed

+6
-4
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ docs/plugin/Leaflet.Control.Opacity/src/.DS_Store
1010
.idea/modules.xml
1111
.idea/vcs.xml
1212
.idea/workspace.xml
13+
docs/plugin/.DS_Store

dist/L.Control.Opacity.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/plugin/Leaflet.Control.Opacity/dist/L.Control.Opacity.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docs/plugin/Leaflet.Control.Opacity/src/L.Control.Opacity.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ L.Control.Opacity = L.Control.extend({
1010
this._layers = [];
1111
this._lastZIndex = 0;
1212
this._handlingClick = false;
13-
for (i in overlays) {
13+
for (var i in overlays) {
1414
this._addLayer(overlays[i], i, true);
1515
}
1616
},
@@ -124,6 +124,7 @@ L.Control.Opacity = L.Control.extend({
124124
this._layerControlInputs.push(input);
125125
input.layerId = L.Util.stamp(obj.layer);
126126
L.DomEvent.on(input, 'click', this._onInputClick, this);
127+
L.DomEvent.on(input, 'touchend', this._onInputClick, this);
127128
var name = document.createElement('span');
128129
name.innerHTML = ' ' + obj.name;
129130
var holder = document.createElement('div');
@@ -159,4 +160,4 @@ L.Control.Opacity = L.Control.extend({
159160

160161
L.control.opacity = function (overlays, options) {
161162
return new L.Control.Opacity(overlays, options);
162-
};
163+
};

0 commit comments

Comments
 (0)