Fix: Ctrl+Shift+B also swaps between the background like Ctrl+B

(closes #4153)
This commit is contained in:
Bryan Housel
2017-07-17 15:29:13 -04:00
parent fbff5195e0
commit dca1cdc440
2 changed files with 11 additions and 2 deletions

View File

@@ -305,13 +305,19 @@ export function uiBackground(context) {
function toggle() {
if (d3.event) d3.event.preventDefault();
if (d3.event) {
d3.event.preventDefault();
}
tooltipBehavior.hide(button);
setVisible(!button.classed('active'));
}
function quickSwitch() {
if (d3.event) {
d3.event.stopImmediatePropagation();
d3.event.preventDefault();
}
if (previous) {
clickSetSource(previous);
}

View File

@@ -78,7 +78,10 @@ export function uiInfo(context) {
function toggle(which) {
if (d3.event) d3.event.preventDefault();
if (d3.event) {
d3.event.stopImmediatePropagation();
d3.event.preventDefault();
}
var activeids = ids.filter(function(k) { return active[k]; });