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
+4 -4
View File
@@ -6,8 +6,6 @@ import {
select as d3_select
} from 'd3-selection';
import { d3keybinding as d3_keybinding } from '../lib/d3.keybinding.js';
import { t } from '../util/locale';
import {
@@ -34,6 +32,8 @@ import {
import { modeBrowse, modeSelect } from './index';
import { osmJoinWays, osmNode } from '../osm';
import { uiFlash } from '../ui';
import { utilKeybinding } from '../util';
export function modeDragNode(context) {
@@ -102,7 +102,7 @@ export function modeDragNode(context) {
function keydown() {
if (d3_event.keyCode === d3_keybinding.modifierCodes.alt) {
if (d3_event.keyCode === utilKeybinding.modifierCodes.alt) {
if (context.surface().classed('nope')) {
context.surface()
.classed('nope-suppressed', true);
@@ -115,7 +115,7 @@ export function modeDragNode(context) {
function keyup() {
if (d3_event.keyCode === d3_keybinding.modifierCodes.alt) {
if (d3_event.keyCode === utilKeybinding.modifierCodes.alt) {
if (context.surface().classed('nope-suppressed')) {
context.surface()
.classed('nope', true);