diff --git a/CHANGELOG.md b/CHANGELOG.md index 2f6516f..b869749 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ### Change Log for Node-RED Worldmap - - v1.5.32 - Add .contextmenu custom right click menu, Fix map lock, Close websocket on unload + - v1.5.33 - Let blank input disable contextmenu completely. Tidy up help, update dialog polyfill. + - v1.5.32 - Add .contextmenu custom right click menu Issue #73, Fix map lock, Close websocket on unload - v1.5.31 - Fix pan first at start, and coords overlay. Issues #81 and #82 - v1.5.30 - Add tooltip option, ability to remove base layer, search on icon, show mouse pointer co-ordinates - v1.5.29 - remove lat/lon from popup if using .popup property. Allow icon to be loaded from http. diff --git a/README.md b/README.md index 3347274..4eb00b3 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,7 @@ map web page for plotting "things" on. ### Updates +- v1.5.33 - Let blank input disable contextmenu completely. Tidy up help, update dialog polyfill. - v1.5.32 - Add .contextmenu custom right click menu, Fix map lock, Close websocket on unload - v1.5.31 - Fix pan first at start, and coords overlay. Issues #81 and #82 - v1.5.30 - Add .tooltip option, ability to remove base layer, search on icon, show mouse pointer co-ordinates diff --git a/package.json b/package.json index 631e9e0..e8fbadf 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "node-red-contrib-web-worldmap", - "version": "1.5.32", + "version": "1.5.33", "description": "A Node-RED node to provide a web page of a world map for plotting things on.", "dependencies": { "cgi": "0.3.1", diff --git a/worldmap/css/map.css b/worldmap/css/map.css index 4e90461..f4198ab 100644 --- a/worldmap/css/map.css +++ b/worldmap/css/map.css @@ -20,6 +20,23 @@ a { text-decoration:none; } +dialog { + z-index: 9999; + width: 60% !important; + border-radius: 6px !important; + border-width: 1px !important; + line-height: 1.4em !important; +} +dialog > p > b { + font-size: unset; +} +dialog > button { + margin-top: 5px; + height: 24px; + border-radius: 4px; + font-weight: 500; +} + .topbar { font-size:16px; vertical-align:middle; @@ -87,7 +104,7 @@ a { top:40px; right:0px; width:200px; - z-index:9999; + z-index:9998; } #menu td { diff --git a/worldmap/index.html b/worldmap/index.html index 3d34465..78d8dff 100644 --- a/worldmap/index.html +++ b/worldmap/index.html @@ -33,7 +33,7 @@ - + @@ -62,7 +62,7 @@ - + @@ -91,21 +91,22 @@ -

Node-RED - Map all the things

-

Search - You may enter a name or partial name of an object to search for.
- The map will then jump to centre on each of the results.

-

Set Max Age - You can set the time after which points +

Node-RED - Map all the things


+

Search - You may enter a name, or partial name, or icon name of an object to search for. + The map will then jump to centre on each of the results in turn. If nothing is found locally it will try to + search for a place name if connected to a network.

+

Set Max Age - You can set the time after which points that haven't been updated get removed.

-

Cluster at zoom - by default multiple objects will be clustered at zoom levels less than 12.

-

Auto Pan - When selected, the map will +

Cluster at zoom - lower numbers mean less clustering. 0 means disable totally.

+

Auto Pan - When selected, the map will automatically move to centre on each data point as they arrive.

-

Lock Map - When selected will save the - currently displayed area and basemap.
- Reloading the map in the current browser will return to the same view.
- This can be used to set your initial start position.
- While active it also restricts the "auto pan" to within that area.

-

Heatmap all layers - When selected - all layers whether hidden or not will contribute to the heatmap.
+

Lock Map - When selected will save the + currently displayed area and basemap. + Reloading the map in the current browser will return to the same view. + This can be used to set your initial start position. + While active it also restricts the "auto pan" and "search" to within that area.

+

Heatmap all layers - When selected + all layers whether hidden or not will contribute to the heatmap. The default is that only visible layers add to the heatmap.

@@ -1348,7 +1349,7 @@ function setMarker(data) { } // customise right click context menu var rightcontext = ""; - if (data.contextmenu && (typeof data.contextmenu === "string")) { + if ((data.contextmenu !== undefined) && (typeof data.contextmenu === "string")) { rightcontext = data.contextmenu.replace(/$name/g,'\""+'+data.name+'+"\"'); delete data.contextmenu; } @@ -1376,7 +1377,10 @@ function setMarker(data) { marker._popup.dname = data.name; marker.lay = lay; // and the layer it is on - if (rightcontext.length > 0) { + if (rightcontext.length === 0) { + marker.on('contextmenu', function() { return; }); + } + else { var rightmenuMarker = L.popup({offset:[0,-12]}).setContent(""+data.name+"
"+rightcontext); marker.on('contextmenu', function(e) { if (hiderightclick !== true) { diff --git a/worldmap/worldmap.appcache b/worldmap/worldmap.appcache index 030ae04..a754b48 100644 --- a/worldmap/worldmap.appcache +++ b/worldmap/worldmap.appcache @@ -1,5 +1,5 @@ CACHE MANIFEST -# date: Mar 15th 2019 - v1.5.32 +# date: Mar 17th 2019 - v1.5.33 CACHE: index.html @@ -9,6 +9,8 @@ images/emoji.js images/node-red.png images/world-50m-flat.json leaflet/L.Terminator.js +leaflet/Leaflet.Coordinates.css +leaflet/Leaflet.Coordinates.js leaflet/Leaflet.Dialog.css leaflet/Leaflet.Dialog.js leaflet/Leaflet.fullscreen.min.js