fix polygon to always have delete option... (maybe)
This commit is contained in:
parent
64db718fea
commit
704b6edcb6
@ -1,5 +1,6 @@
|
||||
### Change Log for Node-RED Worldmap
|
||||
|
||||
- v2.16.3 - Ensure polygons can be deleted.
|
||||
- v2.16.2 - better handling of unpacked gpz objects.
|
||||
- v2.16.0 - Allow specifying custom base map server.
|
||||
- v2.15.8 - Adjust ui check timing for UI worldmap.
|
||||
|
@ -11,6 +11,7 @@ map web page for plotting "things" on.
|
||||
|
||||
### Updates
|
||||
|
||||
- v2.16.3 - Ensure polygons can be deleted.
|
||||
- v2.16.2 - better handling of unpacked gpz objects.
|
||||
- v2.16.0 - Allow specifying custom base map server.
|
||||
- v2.15.8 - Adjust ui check timing for UI worldmap.
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "node-red-contrib-web-worldmap",
|
||||
"version": "2.16.2",
|
||||
"version": "2.16.3",
|
||||
"description": "A Node-RED node to provide a web page of a world map for plotting things on.",
|
||||
"dependencies": {
|
||||
"cgi": "0.3.1",
|
||||
|
@ -428,8 +428,6 @@ function setMaxAge() {
|
||||
if (stale) { clearInterval(stale); }
|
||||
//if (maxage > 0) {
|
||||
stale = setInterval( function() { doTidyUp() }, 20000); // check every 20 secs
|
||||
//} //every minute
|
||||
//console.log("Stale time set :",maxage+"s");
|
||||
}
|
||||
setMaxAge();
|
||||
|
||||
@ -1233,12 +1231,13 @@ var rangerings = function(latlng, options) {
|
||||
|
||||
// the MAIN add something to map function
|
||||
function setMarker(data) {
|
||||
|
||||
var rightmenu = function(m) {
|
||||
// customise right click context menu
|
||||
var rightcontext = "";
|
||||
if (polygons[data.name] == undefined) {
|
||||
rightcontext = "<button id='delbutton' onclick='delMarker(\""+data.name+"\",true);'>Delete</button>";
|
||||
}
|
||||
//if (polygons[data.name] == undefined) {
|
||||
rightcontext = "<button id='delbutton' onclick='delMarker(\""+data.name+"\",true);'>Delete</button>";
|
||||
//}
|
||||
if (data.editable) {
|
||||
rightcontext = "<button onclick='editPoly(\""+data.name+"\",true);'>Edit</button><button onclick='delMarker(\""+data.name+"\",true);'>Delete</button>";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user