Przeglądaj źródła

Factory function should be exported as camelCase L.control

gh-pages
Gregor MacLennan 9 lat temu
rodzic
commit
76abcacb9b
3 zmienionych plików z 4 dodań i 3 usunięć
  1. 1
    0
      CHANGELOG.md
  2. 1
    1
      index.html
  3. 2
    2
      index.js

+ 1
- 0
CHANGELOG.md Wyświetl plik

6
 ## Unreleased
6
 ## Unreleased
7
 
7
 
8
 - ADDED: Add `setLeftLayers()` and `setRightLayers()` methods
8
 - ADDED: Add `setLeftLayers()` and `setRightLayers()` methods
9
+- FIXED: **[BREAKING]** Export factory function on `L.control` not `L.Control`
9
 
10
 
10
 ## [v1.1.1] - 2015-12-03
11
 ## [v1.1.1] - 2015-12-03
11
 
12
 

+ 1
- 1
index.html Wyświetl plik

40
         maxZoom: 16
40
         maxZoom: 16
41
     }).addTo(map)
41
     }).addTo(map)
42
 
42
 
43
-    L.Control.sideBySide(stamenLayer, osmLayer).addTo(map);
43
+    L.control.sideBySide(stamenLayer, osmLayer).addTo(map);
44
     </script>
44
     </script>
45
 </body>
45
 </body>
46
 </html>
46
 </html>

+ 2
- 2
index.js Wyświetl plik

168
   }
168
   }
169
 })
169
 })
170
 
170
 
171
-L.Control.sideBySide = function (leftLayers, rightLayers, options) {
171
+L.control.sideBySide = function (leftLayers, rightLayers, options) {
172
   return new L.Control.SideBySide(leftLayers, rightLayers, options)
172
   return new L.Control.SideBySide(leftLayers, rightLayers, options)
173
 }
173
 }
174
 
174
 
175
-module.export = L.Control.sideBySide
175
+module.exports = L.Control.SideBySide

Ładowanie…
Anuluj
Zapisz