mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-25 17:37:49 +02:00
Validations now update instantly upon an annotated graph change
This commit is contained in:
@@ -210,8 +210,7 @@ export function modeDragNode(context) {
|
||||
}
|
||||
|
||||
context.replace(
|
||||
actionMoveNode(entity.id, loc),
|
||||
moveAnnotation(entity)
|
||||
actionMoveNode(entity.id, loc)
|
||||
);
|
||||
|
||||
// Below here: validations
|
||||
|
||||
@@ -5,7 +5,10 @@ import {
|
||||
|
||||
import { t } from '../util/locale';
|
||||
|
||||
import { actionMove } from '../actions';
|
||||
import {
|
||||
actionMove,
|
||||
actionNoop
|
||||
} from '../actions';
|
||||
import { behaviorEdit } from '../behavior';
|
||||
import { geoViewportEdge, geoVecSubtract } from '../geo';
|
||||
import { modeBrowse, modeSelect } from './index';
|
||||
@@ -63,7 +66,7 @@ export function modeMove(context, entityIDs, baseGraph) {
|
||||
var origMouse = context.projection(_origin);
|
||||
var delta = geoVecSubtract(geoVecSubtract(currMouse, origMouse), nudge);
|
||||
|
||||
fn(actionMove(entityIDs, delta, context.projection, _cache), annotation);
|
||||
fn(actionMove(entityIDs, delta, context.projection, _cache));
|
||||
_prevGraph = context.graph();
|
||||
}
|
||||
|
||||
@@ -98,6 +101,7 @@ export function modeMove(context, entityIDs, baseGraph) {
|
||||
|
||||
function finish() {
|
||||
d3_event.stopPropagation();
|
||||
context.replace(actionNoop(), annotation);
|
||||
context.enter(modeSelect(context, entityIDs));
|
||||
stopNudge();
|
||||
}
|
||||
|
||||
@@ -9,7 +9,10 @@ import {
|
||||
} from 'd3-polygon';
|
||||
|
||||
import { t } from '../util/locale';
|
||||
import { actionRotate } from '../actions';
|
||||
import {
|
||||
actionRotate,
|
||||
actionNoop
|
||||
} from '../actions';
|
||||
import { behaviorEdit } from '../behavior';
|
||||
import { geoVecInterp } from '../geo';
|
||||
import { modeBrowse, modeSelect } from './index';
|
||||
@@ -88,7 +91,7 @@ export function modeRotate(context, entityIDs) {
|
||||
if (typeof _prevAngle === 'undefined') _prevAngle = currAngle;
|
||||
var delta = currAngle - _prevAngle;
|
||||
|
||||
fn(actionRotate(entityIDs, _pivot, delta, projection), annotation);
|
||||
fn(actionRotate(entityIDs, _pivot, delta, projection));
|
||||
|
||||
_prevTransform = currTransform;
|
||||
_prevAngle = currAngle;
|
||||
@@ -98,6 +101,7 @@ export function modeRotate(context, entityIDs) {
|
||||
|
||||
function finish() {
|
||||
d3_event.stopPropagation();
|
||||
context.replace(actionNoop(), annotation);
|
||||
context.enter(modeSelect(context, entityIDs));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user