Fix contextmeu $name substitution

to Close #84
This commit is contained in:
Dave Conway-Jones 2019-03-24 22:29:52 +00:00
parent 286447438b
commit 76942ad3af
No known key found for this signature in database
GPG Key ID: 9E7F9C73F5168CD4

View File

@ -1351,7 +1351,7 @@ function setMarker(data) {
// customise right click context menu // customise right click context menu
var rightcontext = "<button id='delbutton' onclick='delMarker(\""+data.name+"\",true);'>Delete</button>"; var rightcontext = "<button id='delbutton' onclick='delMarker(\""+data.name+"\",true);'>Delete</button>";
if ((data.contextmenu !== undefined) && (typeof data.contextmenu === "string")) { if ((data.contextmenu !== undefined) && (typeof data.contextmenu === "string")) {
rightcontext = data.contextmenu.replace(/$name/g,'\""+'+data.name+'+"\"'); rightcontext = data.contextmenu.replace(/\$name/g,data.name);
delete data.contextmenu; delete data.contextmenu;
} }