mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-19 23:14:47 +02:00
Flash message if drag not allowed because of a hidden connection
(closes #4493)
This commit is contained in:
@@ -19,6 +19,8 @@ en:
|
||||
tail: Click to add nodes to your area. Click the first node to finish the area.
|
||||
draw_line:
|
||||
tail: "Click to add more nodes to the line. Click on other lines to connect to them, and double-click to end the line."
|
||||
drag_node:
|
||||
connected_to_hidden: This can't be edited because it is connected to a hidden feature.
|
||||
operations:
|
||||
add:
|
||||
annotation:
|
||||
|
||||
Vendored
+3
@@ -25,6 +25,9 @@
|
||||
},
|
||||
"draw_line": {
|
||||
"tail": "Click to add more nodes to the line. Click on other lines to connect to them, and double-click to end the line."
|
||||
},
|
||||
"drag_node": {
|
||||
"connected_to_hidden": "This can't be edited because it is connected to a hidden feature."
|
||||
}
|
||||
},
|
||||
"operations": {
|
||||
|
||||
@@ -28,6 +28,7 @@ import {
|
||||
import { geoChooseEdge } from '../geo';
|
||||
import { osmNode } from '../osm';
|
||||
import { utilEntitySelector } from '../util';
|
||||
import { uiFlash } from '../ui';
|
||||
|
||||
|
||||
export function modeDragNode(context) {
|
||||
@@ -106,11 +107,14 @@ export function modeDragNode(context) {
|
||||
|
||||
function start(entity) {
|
||||
wasMidpoint = entity.type === 'midpoint';
|
||||
var hasHidden = context.features().hasHiddenConnections(entity, context.graph());
|
||||
isCancelled = d3_event.sourceEvent.shiftKey || hasHidden;
|
||||
|
||||
isCancelled = d3_event.sourceEvent.shiftKey ||
|
||||
context.features().hasHiddenConnections(entity, context.graph());
|
||||
|
||||
if (isCancelled) {
|
||||
if (hasHidden) {
|
||||
uiFlash().text(t('modes.drag_node.connected_to_hidden'))();
|
||||
}
|
||||
return behavior.cancel();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user