Skip to content

Commit 88d626a

Browse files
committed
bump turf dep, revert graticule tweak
1 parent acedbe6 commit 88d626a

File tree

4 files changed

+31
-29
lines changed

4 files changed

+31
-29
lines changed

package-lock.json

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "5.0.8",
44
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
55
"dependencies": {
6-
"@turf/bezier-spline": "~7.1.0",
6+
"@turf/bezier-spline": "~7.2.0",
77
"cgi": "0.3.1",
88
"compression": "^1.7.5",
99
"express": "^4.21.2",

worldmap/index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<link rel="stylesheet" type="text/css" href="leaflet/Control.MiniMap.min.css">
4141
<link rel="stylesheet" type="text/css" href="leaflet/leaflet-velocity.min.css">
4242
<link rel="stylesheet" type="text/css" href="leaflet/leaflet.mousecoordinate.css">
43-
<link rel="stylesheet" type="text/css" href="leaflet/dialog-polyfill.css"/>
43+
<!-- <link rel="stylesheet" type="text/css" href="leaflet/dialog-polyfill.css"/> -->
4444
<link rel="stylesheet" type="text/css" href="css/worldmap.css"/>
4545

4646
<script src="leaflet/sockjs.min.js"></script>
@@ -82,7 +82,7 @@
8282
<script src="leaflet/leaflet.antimeridian-src.js"></script>
8383
<script src="leaflet/L.TileLayer.PixelFilter.js"></script>
8484
<script src="leaflet/jszip.min.js"></script>
85-
<script src="leaflet/dialog-polyfill.js"></script>
85+
<!-- <script src="leaflet/dialog-polyfill.js"></script> -->
8686
<script src="images/emoji.js"></script>
8787
</head>
8888

worldmap/leaflet/leaflet.latlng-graticule.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,12 @@
230230
this._currZoom = zoom;
231231
}
232232

233+
var interv;
234+
233235
if (!this._currLngInterval) {
234236
try {
235-
for (let idx in this.options.lngInterval) {
236-
let dict = this.options.lngInterval[idx];
237+
for (var idx in this.options.lngInterval) {
238+
var dict = this.options.lngInterval[idx];
237239
if (dict.start <= zoom) {
238240
if (dict.end && dict.end >= zoom) {
239241
this._currLngInterval = dict.interval;
@@ -249,8 +251,8 @@
249251

250252
if (!this._currLatInterval) {
251253
try {
252-
for (let idx in this.options.latInterval) {
253-
let dict = this.options.latInterval[idx];
254+
for (var idx in this.options.latInterval) {
255+
var dict = this.options.latInterval[idx];
254256
if (dict.start <= zoom) {
255257
if (dict.end && dict.end >= zoom) {
256258
this._currLatInterval = dict.interval;
@@ -363,7 +365,7 @@
363365
_lon_delta = curvedLat;
364366
}
365367

366-
let __lon_left = _lon_l, __lon_right = _lon_r;
368+
var __lon_left = _lon_l, __lon_right = _lon_r;
367369
if (ll.x > 0) {
368370
var __lon_left = map.containerPointToLatLng(L.point(0, ll.y));
369371
__lon_left = __lon_left.lng - _point_per_lon;
@@ -403,14 +405,14 @@
403405
ctx.stroke();
404406
}
405407
else {
406-
let __lon_right = _lon_r;
408+
var __lon_right = _lon_r;
407409
var rr = self._latLngToCanvasPoint(L.latLng(lat_tick, __lon_right));
408410
if (curvedLon) {
409411
__lon_right = map.containerPointToLatLng(L.point(0, rr.y));
410412
__lon_right = __lon_right.lng;
411413
rr = self._latLngToCanvasPoint(L.latLng(lat_tick, __lon_right));
412414

413-
let __lon_left = map.containerPointToLatLng(L.point(ww, rr.y));
415+
var __lon_left = map.containerPointToLatLng(L.point(ww, rr.y));
414416
__lon_left = __lon_left.lng;
415417
ll = self._latLngToCanvasPoint(L.latLng(lat_tick, __lon_left));
416418
}

0 commit comments

Comments
 (0)