Leaflet/spec/suites/layer/vector/PathSpec.js
John Firebaugh 4015f49615 Consistent mouse event propagation in Marker and Path
Marker was missing mouseup and mousemove.
Path was missing mouseup.
2013-06-28 14:44:10 -04:00

20 lines
525 B
JavaScript

describe("Path", function() {
var map;
beforeEach(function () {
map = L.map(document.createElement('div')).setView([0, 0], 0);
});
it("propagates events from the container", function() {
var events = ['mousedown', 'mouseup', 'mouseover', 'mouseout',
'mousemove', 'dblclick'];
for (var i = 0; i < events.length; i++) {
var path = new L.Path().addTo(map),
spy = sinon.spy();
path.on(events[i], spy);
happen[events[i]](path._container);
expect(spy.called).to.be.ok();
}
});
});