Use context.keybinding for keybindings that don't change

(closes #5487)
This commit is contained in:
Bryan Housel
2018-11-13 20:57:21 -05:00
parent bb30cbf555
commit 152022aec4
37 changed files with 252 additions and 319 deletions
+7 -7
View File
@@ -55,7 +55,7 @@ export function behaviorHover(context) {
}
var hover = function(selection) {
function behavior(selection) {
_selection = selection;
_newId = null;
@@ -150,10 +150,10 @@ export function behaviorHover(context) {
dispatch.call('hover', this, null);
}
}
};
}
hover.off = function(selection) {
behavior.off = function(selection) {
selection.selectAll('.hover')
.classed('hover', false);
selection.selectAll('.hover-suppressed')
@@ -172,12 +172,12 @@ export function behaviorHover(context) {
};
hover.altDisables = function(_) {
behavior.altDisables = function(val) {
if (!arguments.length) return _altDisables;
_altDisables = _;
return hover;
_altDisables = val;
return behavior;
};
return utilRebind(hover, dispatch, 'on');
return utilRebind(behavior, dispatch, 'on');
}