Don't omit tags when copy/pasting

(closes #4067)
This commit is contained in:
Bryan Housel
2017-05-30 22:29:29 -04:00
parent 8a03bbdef9
commit b87be2d241
-20
View File
@@ -3,7 +3,6 @@ import _ from 'lodash';
import { d3keybinding } from '../lib/d3.keybinding.js';
import {
actionChangeTags,
actionCopyEntities,
actionMove
} from '../actions/index';
@@ -20,22 +19,6 @@ import { uiCmd } from '../ui/index';
export function behaviorPaste(context) {
var keybinding = d3keybinding('paste');
function omitTag(v, k) {
return (
k === 'phone' ||
k === 'fax' ||
k === 'email' ||
k === 'website' ||
k === 'url' ||
k === 'note' ||
k === 'description' ||
k.indexOf('name') !== -1 ||
k.indexOf('wiki') === 0 ||
k.indexOf('addr:') === 0 ||
k.indexOf('contact:') === 0
);
}
function doPaste() {
d3.event.preventDefault();
@@ -64,9 +47,6 @@ export function behaviorPaste(context) {
newEntity = copies[id];
extent._extend(oldEntity.extent(oldGraph));
context.perform(
actionChangeTags(newEntity.id, _.omitBy(newEntity.tags, omitTag))
);
// Exclude child nodes from newIDs if their parent way was also copied.
var parents = context.graph().parentWays(newEntity),