diff --git a/components/2d_network.html b/components/2d_network.html
index cc2dcd82..046c98fb 100644
--- a/components/2d_network.html
+++ b/components/2d_network.html
@@ -2896,11 +2896,23 @@
Export Network Image
$this.parent().hide();
});
+ const isMac = navigator.platform.toUpperCase().indexOf('MAC') >= 0;
+
+ // d3.select(window).on('keydown keyup', function () {
+ // const keyToCheck = isMac ? 'metaKey' : 'ctrlKey';
+ // console.log('isMac: ', isMac);
+ // d3.select('g.brush')
+ // .attr('pointer-events', d3.event[keyToCheck] ? 'all' : 'none')
+ // .select('rect.overlay')
+ // .attr('pointer-events', d3.event[keyToCheck] ? 'all' : 'none');
+ // });
+
d3.select(window).on('keydown keyup', function () {
+ const keyToCheck = isMac ? event.metaKey : event.ctrlKey;
d3.select('g.brush')
- .attr('pointer-events', d3.event.ctrlKey ? 'all' : 'none')
+ .attr('pointer-events', keyToCheck ? 'all' : 'none')
.select('rect.overlay')
- .attr('pointer-events', d3.event.ctrlKey ? 'all' : 'none');
+ .attr('pointer-events', keyToCheck ? 'all' : 'none');
});
let stopSimulation = () => force.stop();
diff --git a/index.html b/index.html
index 8f1b103f..e07cbea1 100644
--- a/index.html
+++ b/index.html
@@ -52,7 +52,7 @@ MicrobeTrace requires CSS to run, but it looks like the appropriate CSS file