mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-27 02:12:24 +02:00
Points always need full re-render (#569)
This commit is contained in:
@@ -1,20 +1,18 @@
|
||||
describe("iD.svg.Points", function () {
|
||||
var surface,
|
||||
projection = Object,
|
||||
filter = d3.functor(true),
|
||||
context;
|
||||
|
||||
beforeEach(function () {
|
||||
context = iD();
|
||||
surface = d3.select(document.createElementNS('http://www.w3.org/2000/svg', 'svg'))
|
||||
.call(iD.svg.Surface(iD()));
|
||||
.call(iD.svg.Surface(context));
|
||||
});
|
||||
|
||||
it("adds tag classes", function () {
|
||||
var node = iD.Node({tags: {amenity: "cafe"}, loc: [0, 0], _poi: true}),
|
||||
graph = iD.Graph([node]);
|
||||
var point = iD.Node({tags: {amenity: "cafe"}, loc: [0, 0]});
|
||||
|
||||
surface.call(iD.svg.Points(projection, context), graph, [node], filter);
|
||||
surface.call(iD.svg.Points(projection, context), [point]);
|
||||
|
||||
expect(surface.select('.point')).to.be.classed('tag-amenity');
|
||||
expect(surface.select('.point')).to.be.classed('tag-amenity-cafe');
|
||||
|
||||
Reference in New Issue
Block a user