Tidy up help, update dialog polyfill.

fix menucontext blank disable, update cache
This commit is contained in:
Dave Conway-Jones 2019-03-17 18:15:52 +00:00
parent 296fa6c910
commit ed6c383ed1
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4
6 changed files with 46 additions and 21 deletions

View File

@ -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.

View File

@ -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

View File

@ -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",

View File

@ -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 {

View File

@ -33,7 +33,7 @@
<link rel="stylesheet",type="text/css" href="leaflet/Leaflet.Dialog.css">
<link rel="stylesheet",type="text/css" href="leaflet/leaflet-velocity.min.css">
<link rel="stylesheet",type="text/css" href="leaflet/leaflet.label.css">
<link rel="stylesheet",type="text/css" href="leaflet/Leaflet.coordinates.css">
<link rel="stylesheet",type="text/css" href="leaflet/Leaflet.Coordinates.css">
<link rel="shortcut icon" type="image/ico" href="favicon.ico"/>
@ -62,7 +62,7 @@
<script type="text/javascript" src="leaflet/OSMBuildings-Leaflet.js"></script>
<script type="text/javascript" src="leaflet/leaflet-omnivore.min.js"></script>
<script type="text/javascript" src="leaflet/leaflet.label.js"></script>
<script type="text/javascript" src="leaflet/Leaflet.coordinates.js"></script>
<script type="text/javascript" src="leaflet/Leaflet.Coordinates.js"></script>
<script type="text/javascript" src="leaflet/dialog-polyfill.js"></script>
<script type="text/javascript" src="images/emoji.js"></script>
@ -91,21 +91,22 @@
<div id="foot"></div>
<dialog id="helpWindow">
<h3>Node-RED - Map all the things</h3>
<p><i class="fa fa-search fa-lg fa-fw"></i> Search - You may enter a name or partial name of an object to search for.<br/>
The map will then jump to centre on each of the results.</p>
<p><i class="fa fa-spinner fa-lg fa-fw"></i> Set Max Age - You can set the time after which points
<h3>Node-RED - Map all the things</h3><br/>
<p><i class="fa fa-search fa-lg fa-fw"></i> <b>Search</b> - 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.</p>
<p><i class="fa fa-spinner fa-lg fa-fw"></i> <b>Set Max Age</b> - You can set the time after which points
that haven't been updated get removed.</p>
<p><i class="fa fa-search-plus fa-lg fa-fw"></i> Cluster at zoom - by default multiple objects will be clustered at zoom levels less than 12.</p>
<p><i class="fa fa-arrows fa-lg fa-fw"></i> Auto Pan - When selected, the map will
<p><i class="fa fa-search-plus fa-lg fa-fw"></i> <b>Cluster at zoom</b> - lower numbers mean less clustering. 0 means disable totally.</p>
<p><i class="fa fa-arrows fa-lg fa-fw"></i> <b>Auto Pan</b> - When selected, the map will
automatically move to centre on each data point as they arrive.</p>
<p><i class="fa fa-lock fa-lg fa-fw"></i> Lock Map - When selected will save the
currently displayed area and basemap.<br/>
Reloading the map in the current browser will return to the same view.<br/>
This can be used to set your initial start position.<br/>
While active it also restricts the "auto pan" to within that area.</p>
<p><i class="fa fa-globe fa-lg fa-fw"></i> Heatmap all layers - When selected
all layers whether hidden or not will contribute to the heatmap.<br/>
<p><i class="fa fa-lock fa-lg fa-fw"></i> <b>Lock Map</b> - 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.</p>
<p><i class="fa fa-globe fa-lg fa-fw"></i> <b>Heatmap all layers</b> - When selected
all layers whether hidden or not will contribute to the heatmap.
The default is that only visible layers add to the heatmap.</p>
<button id="exitHelp">Close</button>
</dialog>
@ -1348,7 +1349,7 @@ function setMarker(data) {
}
// customise right click context menu
var rightcontext = "<button id='delbutton' onclick='delMarker(\""+data.name+"\",true);'>Delete</button>";
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("<b>"+data.name+"</b><br/>"+rightcontext);
marker.on('contextmenu', function(e) {
if (hiderightclick !== true) {

View File

@ -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