toggle touchzoom more correctly

This commit is contained in:
Dave Conway-Jones 2021-02-05 11:46:04 +00:00
parent bfe0c49a4d
commit 0ce0f87aed
No known key found for this signature in database
GPG Key ID: 88BA2B8A411BE9FF
4 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "node-red-contrib-web-worldmap",
"version": "2.8.1",
"version": "2.8.2",
"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

@ -1,3 +1,4 @@
body {
width:100%;
height:100%;

View File

@ -18,9 +18,9 @@
<head>
<title>Node-RED map all the things</title>
<meta charset="UTF-8">
<meta name="mobile-web-app-capable" content="yes">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="mobile-web-app-capable" content="yes"/>
<meta name='viewport' content='width=device-width, initial-scale:1, user-scalable=no'/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<link rel="shortcut icon" type="image/ico" href="favicon.ico"/>
<!-- <link rel="import" href="worldmaphead.html"> -->

View File

@ -2344,11 +2344,13 @@ function doCommand(cmd) {
if (map.doubleClickZoom.enabled()) { map.removeControl(map.zoomControl); }
map.doubleClickZoom.disable();
map.scrollWheelZoom.disable();
map.touchZoom.disable();
}
else {
if (!map.doubleClickZoom.enabled()) { map.addControl(map.zoomControl); }
map.doubleClickZoom.enable();
map.scrollWheelZoom.enable();
map.touchZoom.enable();
}
}
}