Skip to content

Commit a527324

Browse files
committed
Update ixmap_region_migration_flows.html
1 parent 62fee9d commit a527324

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Stage/ixmap_region_migration_flows.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@
6666
.ol-out { min-width:38px; } .ol-net { min-width:44px; }
6767
#source-bar { display:none; }
6868
#ui-toggle { display:block; }
69+
#onmapbuttondivzoom { display:none !important; } /* pinch-zoom on touch; frees the bottom-left corner */
6970
}
7071
</style>
7172
</head>
@@ -122,8 +123,11 @@ <h4 id="dir-legend-title">Direction</h4>
122123
function nsvFromSlider(t){ return Math.round(NSV_MAX - (t/100) * (NSV_MAX - NSV_MIN)); }
123124
function debounce(fn, ms){ var t; return function(){ clearTimeout(t); t = setTimeout(fn, ms); }; }
124125

126+
// touch devices (coarse pointer) start in pan mode; mouse/desktop in info mode
127+
var MAP_MODE = (window.matchMedia && window.matchMedia("(pointer: coarse)").matches) ? "pan" : "info";
128+
125129
var myIXMap = ixmaps.Map("map", {
126-
mapType: "white", mode: "info", legend: "closed", tools: true
130+
mapType: "white", mode: MAP_MODE, legend: "closed", tools: true
127131
})
128132
.view({ center: { lat: 41.9, lng: 12.4 }, zoom: 6 })
129133
.options({ objectscaling: "dynamic", normalSizeScale: "8000000",

0 commit comments

Comments
 (0)