Refactor Entity, Node, Relation, Tags, Way from core to osm

This commit is contained in:
Bryan Housel
2016-10-11 22:41:24 -04:00
parent fd742518c6
commit 07fa5fcc34
52 changed files with 215 additions and 239 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import * as d3 from 'd3';
import { utilRebind } from '../../util/rebind';
import { t } from '../../util/locale';
import { coreOneWayTags } from '../../core/index';
import { osmOneWayTags } from '../../osm/index';
export { uiFieldCheck as uiFieldDefaultcheck };
@@ -36,7 +36,7 @@ export function uiFieldCheck(field) {
// where implied oneway tag exists (e.g. `junction=roundabout`) #2220, #1841
if (field.id === 'oneway') {
for (var key in entity.tags) {
if (key in coreOneWayTags && (entity.tags[key] in coreOneWayTags[key])) {
if (key in osmOneWayTags && (entity.tags[key] in osmOneWayTags[key])) {
texts[0] = t('presets.fields.oneway_yes.options.undefined');
break;
}
+2 -2
View File
@@ -2,7 +2,7 @@ import * as d3 from 'd3';
import { t } from '../../util/locale';
import { behaviorHover } from '../../behavior/index';
import { coreEntity } from '../../core/index';
import { osmEntity } from '../../osm/index';
import {
actionRestrictTurn,
@@ -128,7 +128,7 @@ export function uiFieldRestrictions(field, context) {
function click() {
var datum = d3.event.target.__data__;
if (datum instanceof coreEntity) {
if (datum instanceof osmEntity) {
fromNodeID = intersection.adjacentNodeId(datum.id);
render();
} else if (datum instanceof geoTurn) {