mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-30 03:39:36 +02:00
Refactor Entity, Node, Relation, Tags, Way from core to osm
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import _ from 'lodash';
|
||||
import { coreRelation, coreWay } from '../core/index';
|
||||
import { osmRelation, osmWay } from '../osm/index';
|
||||
import { geoIsSimpleMultipolygonOuterMember, geoSphericalDistance } from '../geo/index';
|
||||
import { actionAddMember } from './add_member';
|
||||
import { utilWrap } from '../util/index';
|
||||
@@ -75,7 +75,7 @@ export function actionSplit(nodeId, newWayIds) {
|
||||
|
||||
|
||||
function split(graph, wayA, newWayId) {
|
||||
var wayB = coreWay({id: newWayId, tags: wayA.tags}),
|
||||
var wayB = osmWay({id: newWayId, tags: wayA.tags}),
|
||||
nodesA,
|
||||
nodesB,
|
||||
isArea = wayA.isArea(),
|
||||
@@ -130,7 +130,7 @@ export function actionSplit(nodeId, newWayIds) {
|
||||
});
|
||||
|
||||
if (!isOuter && isArea) {
|
||||
var multipolygon = coreRelation({
|
||||
var multipolygon = osmRelation({
|
||||
tags: _.extend({}, wayA.tags, {type: 'multipolygon'}),
|
||||
members: [
|
||||
{id: wayA.id, role: 'outer', type: 'way'},
|
||||
|
||||
Reference in New Issue
Block a user