mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 13:18:15 +02:00
Use context.keybinding for keybindings that don't change
(closes #5487)
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user