leaflet-rotate 0.2.6 → 0.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +18 -2
- package/dist/leaflet-rotate-src.js +4 -0
- package/dist/leaflet-rotate-src.js.map +1 -1
- package/dist/leaflet-rotate.js +1 -1
- package/dist/leaflet-rotate.js.map +1 -1
- package/package.json +10 -5
- package/src/map/Map.js +4 -0
- package/test/setup/http_server.js +86 -0
package/README.md
CHANGED
|
@@ -19,13 +19,29 @@ _For a working example see the following [demo](https://raruto.github.io/leaflet
|
|
|
19
19
|
</p>
|
|
20
20
|
</blockquote>
|
|
21
21
|
|
|
22
|
+
### Build Guide
|
|
23
|
+
|
|
24
|
+
Within your local development environment:
|
|
25
|
+
|
|
26
|
+
```shell
|
|
27
|
+
git clone git@github.com:Raruto/leaflet-rotate.git
|
|
28
|
+
cd ./leaflet-rotate
|
|
29
|
+
|
|
30
|
+
npm i # install dependencies
|
|
31
|
+
npm run dev # start dev server at: http://localhost:8080
|
|
32
|
+
npm run build # generate "dist" files (once)
|
|
33
|
+
npm run test # test all "*.spec.js" files (once)
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
After that you can start developing inside the `src` and `test` folders (eg. open "http://localhost:8080/test" in your browser to preview changes).
|
|
37
|
+
|
|
22
38
|
---
|
|
23
39
|
|
|
24
40
|
**Side notes:**
|
|
25
41
|
|
|
26
|
-
Be aware that this
|
|
42
|
+
Be aware that this library overrides notable parts of leaflet core via the [L.Class.include()](https://leafletjs.com/examples/extending/extending-1-classes.html) function in order to make the rotate feature usable as a standalone plug-in.
|
|
27
43
|
|
|
28
|
-
|
|
44
|
+
Initial changes to this project have been apported by comparing the following branches: [https://github.com/Leaflet/Leaflet/compare/main...fnicollet:rotate-master](https://github.com/Leaflet/Leaflet/compare/main...fnicollet:rotate-master) (ref: [bac6c7d](https://github.com/fnicollet/Leaflet/tree/4ab6342f74516e7087dcd2ae786c721f36addf9e))
|
|
29
45
|
|
|
30
46
|
---
|
|
31
47
|
|
|
@@ -979,6 +979,10 @@
|
|
|
979
979
|
* @returns {L.Map} current map instance
|
|
980
980
|
*/
|
|
981
981
|
panInside(latlng, options) {
|
|
982
|
+
if (!this._rotate || Math.abs(this._bearing).toFixed(1) < 0.1) {
|
|
983
|
+
return mapProto.panInside.apply(this, arguments);
|
|
984
|
+
}
|
|
985
|
+
|
|
982
986
|
options = options || {};
|
|
983
987
|
|
|
984
988
|
const paddingTL = L.point(options.paddingTopLeft || options.padding || [0, 0]),
|