Disable operations, copy, and paste during low-zoom selection

This commit is contained in:
Quincy Morgan
2019-12-23 10:33:16 -05:00
parent 11950a26b3
commit ba59bdf23b
3 changed files with 9 additions and 0 deletions

View File

@@ -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();
}

View File

@@ -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;

View File

@@ -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();