mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 05:12:13 +02:00
Move lib/d3.keybinding.js -> util/keybinding.js
almost none of the original d3 "plugin" code remains
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user