fix specs for polygon holes
This commit is contained in:
parent
dc5151b81a
commit
33e23a69e7
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
var path = L.polygon([
|
var path = L.polygon([
|
||||||
[route, [[50.5, 30.5], [50.5, 40], [40, 40]]],
|
[route, [[50.5, 30.5], [50.5, 40], [40, 40]]],
|
||||||
[[20, 0], [20, 40], [0, 40]]
|
[[[20, 0], [20, 40], [0, 40]]]
|
||||||
], {renderer: canvas}).addTo(map).bindPopup('Hello Canvas');
|
], {renderer: canvas}).addTo(map).bindPopup('Hello Canvas');
|
||||||
|
|
||||||
var poly = L.polyline([
|
var poly = L.polyline([
|
||||||
|
@ -36,8 +36,11 @@ describe('Polygon', function () {
|
|||||||
|
|
||||||
var polygon = new L.Polygon(originalLatLngs);
|
var polygon = new L.Polygon(originalLatLngs);
|
||||||
|
|
||||||
//getLatLngs() returns only external ring
|
// getLatLngs() returns both rings
|
||||||
expect(polygon.getLatLngs()).to.eql([L.latLng([0, 10]), L.latLng([10, 10]), L.latLng([10, 0])]);
|
expect(polygon.getLatLngs()).to.eql([
|
||||||
|
[L.latLng([0, 10]), L.latLng([10, 10]), L.latLng([10, 0])],
|
||||||
|
[L.latLng([2, 3]), L.latLng([2, 4]), L.latLng([3, 4])]
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -68,8 +71,10 @@ describe('Polygon', function () {
|
|||||||
var polygon = new L.Polygon([]);
|
var polygon = new L.Polygon([]);
|
||||||
polygon.setLatLngs(latLngs);
|
polygon.setLatLngs(latLngs);
|
||||||
|
|
||||||
//getLatLngs() returns only external ring
|
expect(polygon.getLatLngs()).to.eql([
|
||||||
expect(polygon.getLatLngs()).to.eql([L.latLng([0, 10]), L.latLng([10, 10]), L.latLng([10, 0])]);
|
[L.latLng([0, 10]), L.latLng([10, 10]), L.latLng([10, 0])],
|
||||||
|
[L.latLng([2, 3]), L.latLng([2, 4]), L.latLng([3, 4])]
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user