Code cleanups, changes to replaceMovedVertex in moveAction

Trying to eliminate the minimum 10m distance for replacing the original
junction vertex - this is a small threshold.  When _not_ replacing this
vertex, the unzorro code will wreck havok on a traffic circle.
(If there is no suitable vertex to use, it will snap to a point between
the nearest vertices, see #4146)
This commit is contained in:
Bryan Housel
2018-01-28 23:56:03 -05:00
parent 4e9f1bbc4f
commit 9b200cf514
3 changed files with 91 additions and 70 deletions
+7 -7
View File
@@ -1,16 +1,16 @@
import _some from 'lodash-es/some';
import { t } from '../util/locale';
import { behaviorOperation } from '../behavior/index';
import { geoExtent } from '../geo/index';
import { modeMove } from '../modes/index';
import { behaviorOperation } from '../behavior';
import { geoExtent } from '../geo';
import { modeMove } from '../modes';
export function operationMove(selectedIDs, context) {
var multi = (selectedIDs.length === 1 ? 'single' : 'multiple'),
extent = selectedIDs.reduce(function(extent, id) {
return extent.extend(context.entity(id).extent(context.graph()));
}, geoExtent());
var multi = (selectedIDs.length === 1 ? 'single' : 'multiple');
var extent = selectedIDs.reduce(function(extent, id) {
return extent.extend(context.entity(id).extent(context.graph()));
}, geoExtent());
var operation = function() {