mirror of
https://github.com/FoggedLens/iD.git
synced 2026-06-05 22:46:38 +02:00
Apply tag classes to vertices and points
While here, introduce a `classed` matcher for Chai.
This commit is contained in:
+3
-2
@@ -8,7 +8,7 @@ iD.svg.Points = function() {
|
||||
}
|
||||
}
|
||||
return 'icons/unknown.png';
|
||||
};
|
||||
}
|
||||
|
||||
return function(surface, graph, entities, filter, projection) {
|
||||
var points = [];
|
||||
@@ -40,7 +40,8 @@ iD.svg.Points = function() {
|
||||
.attr({ width: 16, height: 16 })
|
||||
.attr('transform', 'translate(-8, -8)');
|
||||
|
||||
groups.attr('transform', iD.svg.PointTransform(projection));
|
||||
groups.attr('transform', iD.svg.PointTransform(projection))
|
||||
.call(iD.svg.TagClasses());
|
||||
|
||||
// Selecting the following implicitly
|
||||
// sets the data (point entity) on the element
|
||||
|
||||
@@ -26,6 +26,7 @@ iD.svg.Vertices = function() {
|
||||
.attr('r', 4);
|
||||
|
||||
groups.attr('transform', iD.svg.PointTransform(projection))
|
||||
.call(iD.svg.TagClasses())
|
||||
.classed('shared', function(entity) { return graph.parentWays(entity).length > 1; });
|
||||
|
||||
// Selecting the following implicitly
|
||||
|
||||
Reference in New Issue
Block a user