e9957cfa02
* CSS-based paths for L.Icon.Default. #4604, #3696, #4579 * Unit tests for default icons * Make CSS icon path detection IE8-friendly * Backwards compatibility for L.Icon.Default.imagePath override. * Don't overwrite options
34 lines
884 B
JavaScript
34 lines
884 B
JavaScript
describe("Icon.Default", function () {
|
|
|
|
it("icon measures 25x41px", function () {
|
|
var div = document.createElement('div');
|
|
div.style.height = '100px';
|
|
document.body.appendChild(div);
|
|
|
|
var map = L.map(div).setView([0, 0], 0);
|
|
|
|
var marker = new L.Marker([0, 0]).addTo(map);
|
|
|
|
var img = map.getPane('markerPane').querySelector('img');
|
|
expect(img.clientHeight).to.be(41);
|
|
expect(img.clientWidth).to.be(25);
|
|
document.body.removeChild(div);
|
|
});
|
|
|
|
it("shadow measures 41x41px", function () {
|
|
var div = document.createElement('div');
|
|
div.style.height = '100px';
|
|
document.body.appendChild(div);
|
|
|
|
var map = L.map(div).setView([0, 0], 0);
|
|
|
|
var marker = new L.Marker([0, 0]).addTo(map);
|
|
|
|
var img = map.getPane('shadowPane').querySelector('img');
|
|
expect(img.clientHeight).to.be(41);
|
|
expect(img.clientWidth).to.be(41);
|
|
document.body.removeChild(div);
|
|
});
|
|
|
|
});
|