Simon Hunt

GUI -- Enhancements for mobile devices:

- Enable zoom by default
- Suppress tooltips
- Suppress user-selection "blue-square" from #ov-topo svg

Change-Id: I00918f669444822a8b2b89f6c057741a0251fbd1
......@@ -64,9 +64,11 @@
// === API functions ------------------------------------------------
function showTooltip(el, msg) {
if (!el || !msg) {
// tooltips don't make sense on mobile devices
if (!el || !msg || fs.isMobile()) {
return;
}
var elem = d3.select(el),
mouseX = d3.event.pageX,
mouseY = d3.event.pageY,
......
......@@ -20,6 +20,10 @@
/* --- Base SVG Layer --- */
#ov-topo svg {
/* prevents the little cut/copy/paste square that would appear on iPad */
-webkit-user-select: none;
}
.light #ov-topo svg {
background-color: #fff;
}
......
......@@ -168,7 +168,7 @@
// zoom enabled predicate. ev is a D3 source event.
function zoomEnabled(ev) {
return (ev.metaKey || ev.altKey);
return fs.isMobile() || (ev.metaKey || ev.altKey);
}
function zoomCallback() {
......