Browse Source

Factory function should be exported as camelCase L.control

gh-pages
Gregor MacLennan 9 years ago
parent
commit
76abcacb9b
3 changed files with 4 additions and 3 deletions
  1. 1
    0
      CHANGELOG.md
  2. 1
    1
      index.html
  3. 2
    2
      index.js

+ 1
- 0
CHANGELOG.md View 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 View 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 View 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…
Cancel
Save