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 @@ ...@@ -64,9 +64,11 @@
64 // === API functions ------------------------------------------------ 64 // === API functions ------------------------------------------------
65 65
66 function showTooltip(el, msg) { 66 function showTooltip(el, msg) {
67 - if (!el || !msg) { 67 + // tooltips don't make sense on mobile devices
68 + if (!el || !msg || fs.isMobile()) {
68 return; 69 return;
69 } 70 }
71 +
70 var elem = d3.select(el), 72 var elem = d3.select(el),
71 mouseX = d3.event.pageX, 73 mouseX = d3.event.pageX,
72 mouseY = d3.event.pageY, 74 mouseY = d3.event.pageY,
......
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
20 20
21 /* --- Base SVG Layer --- */ 21 /* --- Base SVG Layer --- */
22 22
23 +#ov-topo svg {
24 + /* prevents the little cut/copy/paste square that would appear on iPad */
25 + -webkit-user-select: none;
26 +}
23 .light #ov-topo svg { 27 .light #ov-topo svg {
24 background-color: #fff; 28 background-color: #fff;
25 } 29 }
......
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
168 168
169 // zoom enabled predicate. ev is a D3 source event. 169 // zoom enabled predicate. ev is a D3 source event.
170 function zoomEnabled(ev) { 170 function zoomEnabled(ev) {
171 - return (ev.metaKey || ev.altKey); 171 + return fs.isMobile() || (ev.metaKey || ev.altKey);
172 } 172 }
173 173
174 function zoomCallback() { 174 function zoomCallback() {
......