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