Simon Hunt

GUI -- Relabeled "Meta to select" button to "Pan/Zoom" -- makes more sense to me.

Change-Id: I331ff3aa584a42dcda5c2323b46297c9ca089a13
...@@ -1222,7 +1222,7 @@ ...@@ -1222,7 +1222,7 @@
1222 meta = srcEv.metaKey, 1222 meta = srcEv.metaKey,
1223 shift = srcEv.shiftKey; 1223 shift = srcEv.shiftKey;
1224 1224
1225 - if ((metaSelect() && !meta) || (!metaSelect() && meta)) { 1225 + if ((panZoom() && !meta) || (!panZoom() && meta)) {
1226 return; 1226 return;
1227 } 1227 }
1228 1228
...@@ -1388,7 +1388,7 @@ ...@@ -1388,7 +1388,7 @@
1388 1388
1389 function setupZoomPan() { 1389 function setupZoomPan() {
1390 function zoomed() { 1390 function zoomed() {
1391 - if (!metaSelect() ^ !d3.event.sourceEvent.metaKey) { 1391 + if (!panZoom() ^ !d3.event.sourceEvent.metaKey) {
1392 zoomPan(d3.event.scale, d3.event.translate); 1392 zoomPan(d3.event.scale, d3.event.translate);
1393 } 1393 }
1394 } 1394 }
...@@ -1444,16 +1444,16 @@ ...@@ -1444,16 +1444,16 @@
1444 // by the framework; not generated by the view. 1444 // by the framework; not generated by the view.
1445 1445
1446 var showTrafficOnHover, 1446 var showTrafficOnHover,
1447 - metaToSelect; 1447 + doPanZoom;
1448 1448
1449 function addButtonBar(view) { 1449 function addButtonBar(view) {
1450 var bb = d3.select('#mast') 1450 var bb = d3.select('#mast')
1451 .append('span').classed('right', true).attr('id', 'bb'); 1451 .append('span').classed('right', true).attr('id', 'bb');
1452 1452
1453 - metaToSelect = bb.append('span') 1453 + doPanZoom = bb.append('span')
1454 .classed('btn', true) 1454 .classed('btn', true)
1455 - .text('Meta to select') 1455 + .text('Pan/Zoom')
1456 - .on('click', toggleMetaSelect); 1456 + .on('click', togglePanZoom);
1457 1457
1458 showTrafficOnHover = bb.append('span') 1458 showTrafficOnHover = bb.append('span')
1459 .classed('btn', true) 1459 .classed('btn', true)
...@@ -1469,12 +1469,12 @@ ...@@ -1469,12 +1469,12 @@
1469 return showTrafficOnHover.classed('active'); 1469 return showTrafficOnHover.classed('active');
1470 } 1470 }
1471 1471
1472 - function toggleMetaSelect() { 1472 + function togglePanZoom() {
1473 - metaToSelect.classed('active', !metaSelect()); 1473 + doPanZoom.classed('active', !panZoom());
1474 } 1474 }
1475 1475
1476 - function metaSelect() { 1476 + function panZoom() {
1477 - return metaToSelect.classed('active'); 1477 + return doPanZoom.classed('active');
1478 } 1478 }
1479 1479
1480 // ============================== 1480 // ==============================
...@@ -1563,7 +1563,7 @@ ...@@ -1563,7 +1563,7 @@
1563 .on('tick', tick); 1563 .on('tick', tick);
1564 1564
1565 network.drag = d3u.createDragBehavior(network.force, 1565 network.drag = d3u.createDragBehavior(network.force,
1566 - selectCb, atDragEnd, metaSelect); 1566 + selectCb, atDragEnd, panZoom);
1567 1567
1568 // create mask layer for when we lose connection to server. 1568 // create mask layer for when we lose connection to server.
1569 mask = view.$div.append('div').attr('id','topo-mask'); 1569 mask = view.$div.append('div').attr('id','topo-mask');
......