Sfoglia il codice sorgente

Factory function should be exported as camelCase L.control

gh-pages
Gregor MacLennan 9 anni fa
parent
commit
76abcacb9b
3 ha cambiato i file con 4 aggiunte e 3 eliminazioni
  1. 1
    0
      CHANGELOG.md
  2. 1
    1
      index.html
  3. 2
    2
      index.js

+ 1
- 0
CHANGELOG.md Vedi File

@@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
6 6
 ## Unreleased
7 7
 
8 8
 - ADDED: Add `setLeftLayers()` and `setRightLayers()` methods
9
+- FIXED: **[BREAKING]** Export factory function on `L.control` not `L.Control`
9 10
 
10 11
 ## [v1.1.1] - 2015-12-03
11 12
 

+ 1
- 1
index.html Vedi File

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

+ 2
- 2
index.js Vedi File

@@ -168,8 +168,8 @@ L.Control.SideBySide = L.Control.extend({
168 168
   }
169 169
 })
170 170
 
171
-L.Control.sideBySide = function (leftLayers, rightLayers, options) {
171
+L.control.sideBySide = function (leftLayers, rightLayers, options) {
172 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

Loading…
Annulla
Salva