mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
Disable operations, copy, and paste during low-zoom selection
This commit is contained in:
@@ -46,6 +46,9 @@ export function behaviorCopy(context) {
|
||||
|
||||
|
||||
function doCopy() {
|
||||
// prevent copy during low zoom selection
|
||||
if (!context.map().withinEditableZoom()) return;
|
||||
|
||||
if (!getSelectionText()) {
|
||||
d3_event.preventDefault();
|
||||
}
|
||||
|
||||
@@ -7,6 +7,9 @@ export function behaviorOperation(context) {
|
||||
var _operation;
|
||||
|
||||
function keypress() {
|
||||
// prevent operations during low zoom selection
|
||||
if (!context.map().withinEditableZoom()) return;
|
||||
|
||||
d3_event.preventDefault();
|
||||
var disabled = _operation.disabled();
|
||||
var flash;
|
||||
|
||||
@@ -10,6 +10,9 @@ import { uiCmd } from '../ui/cmd';
|
||||
export function behaviorPaste(context) {
|
||||
|
||||
function doPaste() {
|
||||
// prevent paste during low zoom selection
|
||||
if (!context.map().withinEditableZoom()) return;
|
||||
|
||||
d3_event.preventDefault();
|
||||
|
||||
var baseGraph = context.graph();
|
||||
|
||||
Reference in New Issue
Block a user