mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-15 13:38:26 +02:00
Remove redundant source property
This commit is contained in:
+38
-38
@@ -57,98 +57,98 @@
|
||||
|
||||
/* Keep Right Errors
|
||||
------------------------------------------------------- */
|
||||
.kr.error_type-20, /* multiple nodes on same spot */
|
||||
.kr.error_type-40, /* impossible oneways */
|
||||
.kr.error_type-210, /* self intersecting ways */
|
||||
.kr.error_type-270, /* unusual motorway connection */
|
||||
.kr.error_type-310, /* roundabout issues */
|
||||
.kr.error_type-320, /* improper _link */
|
||||
.kr.error_type-350 { /* improper bridge tag */
|
||||
.keepRight.error_type-20, /* multiple nodes on same spot */
|
||||
.keepRight.error_type-40, /* impossible oneways */
|
||||
.keepRight.error_type-210, /* self intersecting ways */
|
||||
.keepRight.error_type-270, /* unusual motorway connection */
|
||||
.keepRight.error_type-310, /* roundabout issues */
|
||||
.keepRight.error_type-320, /* improper _link */
|
||||
.keepRight.error_type-350 { /* improper bridge tag */
|
||||
color: #ff9;
|
||||
}
|
||||
|
||||
.kr.error_type-50 { /* almost junctions */
|
||||
.keepRight.error_type-50 { /* almost junctions */
|
||||
color: #88f;
|
||||
}
|
||||
|
||||
.kr.error_type-60, /* deprecated tags */
|
||||
.kr.error_type-70, /* tagging issues */
|
||||
.kr.error_type-90, /* motorway without ref */
|
||||
.kr.error_type-100, /* place of worship without religion */
|
||||
.kr.error_type-110, /* poi without name */
|
||||
.kr.error_type-150, /* railway crossing without tag */
|
||||
.kr.error_type-220, /* misspelled tag */
|
||||
.kr.error_type-380 { /* non-physical sport tag */
|
||||
.keepRight.error_type-60, /* deprecated tags */
|
||||
.keepRight.error_type-70, /* tagging issues */
|
||||
.keepRight.error_type-90, /* motorway without ref */
|
||||
.keepRight.error_type-100, /* place of worship without religion */
|
||||
.keepRight.error_type-110, /* poi without name */
|
||||
.keepRight.error_type-150, /* railway crossing without tag */
|
||||
.keepRight.error_type-220, /* misspelled tag */
|
||||
.keepRight.error_type-380 { /* non-physical sport tag */
|
||||
color: #5d0;
|
||||
}
|
||||
|
||||
.kr.error_type-130 { /* disconnected ways */
|
||||
.keepRight.error_type-130 { /* disconnected ways */
|
||||
color: #fa3;
|
||||
}
|
||||
|
||||
.kr.error_type-170 { /* FIXME tag */
|
||||
.keepRight.error_type-170 { /* FIXME tag */
|
||||
color: #ff0;
|
||||
}
|
||||
|
||||
.kr.error_type-190 { /* intersection without junction */
|
||||
.keepRight.error_type-190 { /* intersection without junction */
|
||||
color: #f33;
|
||||
}
|
||||
|
||||
.kr.error_type-200 { /* overlapping ways */
|
||||
.keepRight.error_type-200 { /* overlapping ways */
|
||||
color: #fdbf6f;
|
||||
}
|
||||
|
||||
.kr.error_type-160, /* railway layer conflict */
|
||||
.kr.error_type-230 { /* layer conflict */
|
||||
.keepRight.error_type-160, /* railway layer conflict */
|
||||
.keepRight.error_type-230 { /* layer conflict */
|
||||
color: #b60;
|
||||
}
|
||||
|
||||
.kr.error_type-280 { /* boundary issues */
|
||||
.keepRight.error_type-280 { /* boundary issues */
|
||||
color: #5f47a0;
|
||||
}
|
||||
|
||||
.kr.error_type-180, /* relation without type */
|
||||
.kr.error_type-290 { /* turn restriction issues */
|
||||
.keepRight.error_type-180, /* relation without type */
|
||||
.keepRight.error_type-290 { /* turn restriction issues */
|
||||
color: #ace;
|
||||
}
|
||||
|
||||
.kr.error_type-300, /* missing maxspeed */
|
||||
.kr.error_type-390 { /* missing tracktype */
|
||||
.keepRight.error_type-300, /* missing maxspeed */
|
||||
.keepRight.error_type-390 { /* missing tracktype */
|
||||
color: #090;
|
||||
}
|
||||
|
||||
.kr.error_type-360, /* language unknown */
|
||||
.kr.error_type-370, /* doubled places */
|
||||
.kr.error_type-410 { /* website issues */
|
||||
.keepRight.error_type-360, /* language unknown */
|
||||
.keepRight.error_type-370, /* doubled places */
|
||||
.keepRight.error_type-410 { /* website issues */
|
||||
color: #f9b;
|
||||
}
|
||||
|
||||
.kr.error_type-120, /* way without nodes */
|
||||
.kr.error_type-400 { /* geometry / turn angles */
|
||||
.keepRight.error_type-120, /* way without nodes */
|
||||
.keepRight.error_type-400 { /* geometry / turn angles */
|
||||
color: #c35;
|
||||
}
|
||||
|
||||
/* ImproveOSM Errors
|
||||
------------------------------------------------------- */
|
||||
|
||||
.iOSM.error_type-ow { /* missing one way */
|
||||
.improveOSM.error_type-ow { /* missing one way */
|
||||
color: #1E90FF;
|
||||
}
|
||||
|
||||
.iOSM.error_type-mr-road { /* missing road */
|
||||
.improveOSM.error_type-mr-road { /* missing road */
|
||||
color: #B452CD;
|
||||
}
|
||||
.iOSM.error_type-mr-path { /* missing path */
|
||||
.improveOSM.error_type-mr-path { /* missing path */
|
||||
color: #A0522D;
|
||||
}
|
||||
.iOSM.error_type-mr-parking { /* missing parking */
|
||||
.improveOSM.error_type-mr-parking { /* missing parking */
|
||||
color: #EEEE00;
|
||||
}
|
||||
.iOSM.error_type-mr-both { /* missing road+parking */
|
||||
.improveOSM.error_type-mr-both { /* missing road+parking */
|
||||
color: #FFA500;
|
||||
}
|
||||
|
||||
.iOSM.error_type-tr { /* missing turn restriction */
|
||||
.improveOSM.error_type-tr { /* missing turn restriction */
|
||||
color: #EC1C24;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"services": {
|
||||
"improveOSM": {
|
||||
"shortName": "iOSM",
|
||||
"errorTypes": {
|
||||
"ow": {
|
||||
"icon": "fas-long-arrow-alt-right",
|
||||
@@ -30,7 +29,6 @@
|
||||
}
|
||||
},
|
||||
"keepRight": {
|
||||
"shortName": "kr",
|
||||
"errorTypes": {
|
||||
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ export function behaviorHover(context) {
|
||||
|
||||
} else if (datum instanceof qaError) {
|
||||
entity = datum;
|
||||
selector = '.' + datum.source + '.error_id-' + datum.id;
|
||||
selector = '.' + datum.service + '.error_id-' + datum.id;
|
||||
|
||||
} else if (datum instanceof osmNote) {
|
||||
entity = datum;
|
||||
|
||||
@@ -173,7 +173,7 @@ export function behaviorSelect(context) {
|
||||
} else if (datum instanceof qaError & !isMultiselect) { // clicked an external QA error
|
||||
context
|
||||
.selectedErrorID(datum.id)
|
||||
.enter(modeSelectError(context, datum.id, datum.source));
|
||||
.enter(modeSelectError(context, datum.id, datum.service));
|
||||
} else { // clicked nothing..
|
||||
context.selectedNoteID(null);
|
||||
context.selectedErrorID(null);
|
||||
|
||||
@@ -17,7 +17,7 @@ import { uiImproveOsmEditor, uiKeepRightEditor } from '../ui';
|
||||
import { utilKeybinding } from '../util';
|
||||
|
||||
|
||||
export function modeSelectError(context, selectedErrorID, selectedErrorSource) {
|
||||
export function modeSelectError(context, selectedErrorID, selectedErrorService) {
|
||||
var mode = {
|
||||
id: 'select-error',
|
||||
button: 'browse'
|
||||
@@ -25,10 +25,10 @@ export function modeSelectError(context, selectedErrorID, selectedErrorSource) {
|
||||
|
||||
var keybinding = utilKeybinding('select-error');
|
||||
|
||||
var errorService, errorEditor;
|
||||
switch (selectedErrorSource) {
|
||||
case 'iOSM':
|
||||
errorService = services.improveOSM;
|
||||
var errorService = services[selectedErrorService];
|
||||
var errorEditor;
|
||||
switch (selectedErrorService) {
|
||||
case 'improveOSM':
|
||||
errorEditor = uiImproveOsmEditor(context)
|
||||
.on('change', function() {
|
||||
context.map().pan([0,0]); // trigger a redraw
|
||||
@@ -38,8 +38,7 @@ export function modeSelectError(context, selectedErrorID, selectedErrorSource) {
|
||||
.show(errorEditor.error(error));
|
||||
});
|
||||
break;
|
||||
case 'kr':
|
||||
errorService = services.keepRight;
|
||||
case 'keepRight':
|
||||
errorEditor = uiKeepRightEditor(context)
|
||||
.on('change', function() {
|
||||
context.map().pan([0,0]); // trigger a redraw
|
||||
@@ -153,4 +152,4 @@ export function modeSelectError(context, selectedErrorID, selectedErrorSource) {
|
||||
|
||||
|
||||
return mode;
|
||||
}
|
||||
}
|
||||
@@ -47,7 +47,6 @@ _extend(qaError.prototype, {
|
||||
if (serviceInfo) {
|
||||
var errInfo = serviceInfo.errorTypes[this.error_type];
|
||||
|
||||
this.source = serviceInfo.shortName;
|
||||
if (errInfo) {
|
||||
this.icon = errInfo.icon;
|
||||
this.category = errInfo.category;
|
||||
|
||||
@@ -53,9 +53,9 @@ export function svgImproveOSM(projection, context, dispatch) {
|
||||
_improveOsmVisible = false;
|
||||
drawLayer
|
||||
.style('display', 'none');
|
||||
drawLayer.selectAll('.qa_error.iOSM')
|
||||
drawLayer.selectAll('.qa_error.improveOSM')
|
||||
.remove();
|
||||
touchLayer.selectAll('.qa_error.iOSM')
|
||||
touchLayer.selectAll('.qa_error.improveOSM')
|
||||
.remove();
|
||||
}
|
||||
}
|
||||
@@ -80,7 +80,7 @@ export function svgImproveOSM(projection, context, dispatch) {
|
||||
function layerOff() {
|
||||
throttledRedraw.cancel();
|
||||
drawLayer.interrupt();
|
||||
touchLayer.selectAll('.qa_error.iOSM')
|
||||
touchLayer.selectAll('.qa_error.improveOSM')
|
||||
.remove();
|
||||
|
||||
drawLayer
|
||||
@@ -104,7 +104,7 @@ export function svgImproveOSM(projection, context, dispatch) {
|
||||
var getTransform = svgPointTransform(projection);
|
||||
|
||||
// Draw markers..
|
||||
var markers = drawLayer.selectAll('.qa_error.iOSM')
|
||||
var markers = drawLayer.selectAll('.qa_error.improveOSM')
|
||||
.data(data, function(d) { return d.id; });
|
||||
|
||||
// exit
|
||||
@@ -117,7 +117,7 @@ export function svgImproveOSM(projection, context, dispatch) {
|
||||
.attr('class', function(d) {
|
||||
return [
|
||||
'qa_error',
|
||||
d.source,
|
||||
d.service,
|
||||
'error_id-' + d.id,
|
||||
'error_type-' + d.error_type,
|
||||
'category-' + d.category
|
||||
@@ -170,7 +170,7 @@ export function svgImproveOSM(projection, context, dispatch) {
|
||||
if (touchLayer.empty()) return;
|
||||
var fillClass = context.getDebug('target') ? 'pink ' : 'nocolor ';
|
||||
|
||||
var targets = touchLayer.selectAll('.qa_error.iOSM')
|
||||
var targets = touchLayer.selectAll('.qa_error.improveOSM')
|
||||
.data(data, function(d) { return d.id; });
|
||||
|
||||
// exit
|
||||
@@ -187,7 +187,7 @@ export function svgImproveOSM(projection, context, dispatch) {
|
||||
.merge(targets)
|
||||
.sort(sortY)
|
||||
.attr('class', function(d) {
|
||||
return 'qa_error ' + d.source + ' target error_id-' + d.id + ' ' + fillClass;
|
||||
return 'qa_error ' + d.service + ' target error_id-' + d.id + ' ' + fillClass;
|
||||
})
|
||||
.attr('transform', getTransform);
|
||||
|
||||
|
||||
@@ -54,9 +54,9 @@ export function svgKeepRight(projection, context, dispatch) {
|
||||
_keepRightVisible = false;
|
||||
drawLayer
|
||||
.style('display', 'none');
|
||||
drawLayer.selectAll('.qa_error.kr')
|
||||
drawLayer.selectAll('.qa_error.keepRight')
|
||||
.remove();
|
||||
touchLayer.selectAll('.qa_error.kr')
|
||||
touchLayer.selectAll('.qa_error.keepRight')
|
||||
.remove();
|
||||
}
|
||||
}
|
||||
@@ -81,7 +81,7 @@ export function svgKeepRight(projection, context, dispatch) {
|
||||
function layerOff() {
|
||||
throttledRedraw.cancel();
|
||||
drawLayer.interrupt();
|
||||
touchLayer.selectAll('.qa_error.kr')
|
||||
touchLayer.selectAll('.qa_error.keepRight')
|
||||
.remove();
|
||||
|
||||
drawLayer
|
||||
@@ -105,7 +105,7 @@ export function svgKeepRight(projection, context, dispatch) {
|
||||
var getTransform = svgPointTransform(projection);
|
||||
|
||||
// Draw markers..
|
||||
var markers = drawLayer.selectAll('.qa_error.kr')
|
||||
var markers = drawLayer.selectAll('.qa_error.keepRight')
|
||||
.data(data, function(d) { return d.id; });
|
||||
|
||||
// exit
|
||||
@@ -118,7 +118,7 @@ export function svgKeepRight(projection, context, dispatch) {
|
||||
.attr('class', function(d) {
|
||||
return [
|
||||
'qa_error',
|
||||
d.source,
|
||||
d.service,
|
||||
'error_id-' + d.id,
|
||||
'error_type-' + d.parent_error_type
|
||||
].join(' ');
|
||||
@@ -157,7 +157,7 @@ export function svgKeepRight(projection, context, dispatch) {
|
||||
if (touchLayer.empty()) return;
|
||||
var fillClass = context.getDebug('target') ? 'pink ' : 'nocolor ';
|
||||
|
||||
var targets = touchLayer.selectAll('.qa_error.kr')
|
||||
var targets = touchLayer.selectAll('.qa_error.keepRight')
|
||||
.data(data, function(d) { return d.id; });
|
||||
|
||||
// exit
|
||||
@@ -174,7 +174,7 @@ export function svgKeepRight(projection, context, dispatch) {
|
||||
.merge(targets)
|
||||
.sort(sortY)
|
||||
.attr('class', function(d) {
|
||||
return 'qa_error ' + d.source + ' target error_id-' + d.id + ' ' + fillClass;
|
||||
return 'qa_error ' + d.service + ' target error_id-' + d.id + ' ' + fillClass;
|
||||
})
|
||||
.attr('transform', getTransform);
|
||||
|
||||
@@ -247,4 +247,4 @@ export function svgKeepRight(projection, context, dispatch) {
|
||||
|
||||
|
||||
return drawKeepRight;
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ export function uiImproveOsmHeader() {
|
||||
return [
|
||||
'preset-icon-28',
|
||||
'qa_error',
|
||||
d.source,
|
||||
d.service,
|
||||
'error_id-' + d.id,
|
||||
'error_type-' + d.error_type,
|
||||
'category-' + d.category
|
||||
|
||||
@@ -49,7 +49,7 @@ export function uiKeepRightHeader() {
|
||||
iconEnter
|
||||
.append('div')
|
||||
.attr('class', function(d) {
|
||||
return 'preset-icon-28 qa_error ' + d.source + ' error_id-' + d.id + ' error_type-' + d.parent_error_type;
|
||||
return 'preset-icon-28 qa_error ' + d.service + ' error_id-' + d.id + ' error_type-' + d.parent_error_type;
|
||||
})
|
||||
.call(svgIcon('#iD-icon-bolt', 'qa_error-fill'));
|
||||
|
||||
@@ -68,4 +68,4 @@ export function uiKeepRightHeader() {
|
||||
|
||||
|
||||
return keepRightHeader;
|
||||
}
|
||||
}
|
||||
@@ -149,9 +149,9 @@ export function uiSidebar(context) {
|
||||
}
|
||||
|
||||
// Temporary solution while only two services
|
||||
var errEditor = (datum.source === 'kr') ? keepRightEditor : improveOsmEditor;
|
||||
var errEditor = (datum.service === 'keepRight') ? keepRightEditor : improveOsmEditor;
|
||||
|
||||
d3_selectAll('.qa_error.' + datum.source)
|
||||
d3_selectAll('.qa_error.' + datum.service)
|
||||
.classed('hover', function(d) { return d.id === datum.id; });
|
||||
|
||||
sidebar
|
||||
|
||||
Reference in New Issue
Block a user