"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "spec/suites/layer/PopupSpec.js" between
Leaflet-1.8.0.tar.gz and Leaflet-1.9.0.tar.gz

About: Leaflet is a JavaScript library for mobile-friendly interactive maps.

PopupSpec.js  (Leaflet-1.8.0):PopupSpec.js  (Leaflet-1.9.0)
skipping to change at line 343 skipping to change at line 343
duration: 1 duration: 1
}); });
map.openPopup('<div style="height: 400px;"></div>', [58.4 , 37.6], { map.openPopup('<div style="height: 400px;"></div>', [58.4 , 37.6], {
autoPan: true, autoPan: true,
autoPanPadding: L.point(10, 10) autoPanPadding: L.point(10, 10)
}); });
}); });
}); });
it("opens popup with passed latlng position while initializing", function
() {
var popup = new L.Popup(center)
.openOn(map);
expect(map.hasLayer(popup)).to.be(true);
});
it("opens popup with passed latlng and options position while initializin
g", function () {
var popup = new L.Popup(center, {className: 'testClass'})
.addTo(map);
expect(map.hasLayer(popup)).to.be(true);
expect(L.DomUtil.hasClass(popup.getElement(), 'testClass')).to.be
(true);
});
it("adds popup with passed content in options while initializing", functi
on () {
var popup = new L.Popup(center, {content: 'Test'})
.addTo(map);
expect(map.hasLayer(popup)).to.be(true);
expect(popup.getContent()).to.be('Test');
});
describe("L.Map#openPopup", function () { describe("L.Map#openPopup", function () {
it("adds the popup layer to the map", function () { it("adds the popup layer to the map", function () {
var popup = L.popup() var popup = L.popup()
.setLatLng(center); .setLatLng(center);
map.openPopup(popup); map.openPopup(popup);
expect(map.hasLayer(popup)).to.be(true); expect(map.hasLayer(popup)).to.be(true);
}); });
it("sets popup location", function () { it("sets popup location", function () {
var popup = L.popup(); var popup = L.popup();
 End of changes. 1 change blocks. 
0 lines changed or deleted 24 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)