Move lib/d3.keybinding.js -> util/keybinding.js

almost none of the original d3 "plugin" code remains
This commit is contained in:
Bryan Housel
2018-11-13 13:42:09 -05:00
parent 2ffcec965a
commit bb30cbf555
35 changed files with 176 additions and 231 deletions
+3 -4
View File
@@ -5,9 +5,8 @@ import {
select as d3_select
} from 'd3-selection';
import { d3keybinding as d3_keybinding } from '../lib/d3.keybinding.js';
import { osmEntity, osmNote } from '../osm';
import { utilRebind } from '../util/rebind';
import { utilKeybinding, utilRebind } from '../util';
/*
@@ -29,7 +28,7 @@ export function behaviorHover(context) {
function keydown() {
if (_altDisables && d3_event.keyCode === d3_keybinding.modifierCodes.alt) {
if (_altDisables && d3_event.keyCode === utilKeybinding.modifierCodes.alt) {
_selection.selectAll('.hover')
.classed('hover-suppressed', true)
.classed('hover', false);
@@ -43,7 +42,7 @@ export function behaviorHover(context) {
function keyup() {
if (_altDisables && d3_event.keyCode === d3_keybinding.modifierCodes.alt) {
if (_altDisables && d3_event.keyCode === utilKeybinding.modifierCodes.alt) {
_selection.selectAll('.hover-suppressed')
.classed('hover-suppressed', false)
.classed('hover', true);