mirror of
https://github.com/Leaflet/Leaflet.git
synced 2025-08-16 16:45:22 +00:00
We need pass event to map when canvas does not have targets
This commit is contained in:
@ -94,6 +94,13 @@ describe('Canvas', function () {
|
||||
expect(spyCircle.callCount).to.eql(1);
|
||||
});
|
||||
|
||||
it("should not block mousemove event going to non-canvas features", function () {
|
||||
var spyMap = sinon.spy();
|
||||
map.on("mousemove", spyMap);
|
||||
happen.at('mousemove', 151, 151); // empty space
|
||||
expect(spyMap.calledOnce).to.be.ok();
|
||||
});
|
||||
|
||||
it("should fire preclick before click", function () {
|
||||
var clickSpy = sinon.spy();
|
||||
var preclickSpy = sinon.spy();
|
||||
|
@ -410,9 +410,7 @@ export var Canvas = Renderer.extend({
|
||||
}
|
||||
}
|
||||
|
||||
if (this._hoveredLayer) {
|
||||
this._fireEvent([this._hoveredLayer], e);
|
||||
}
|
||||
this._fireEvent(this._hoveredLayer ? [this._hoveredLayer] : false, e);
|
||||
|
||||
this._mouseHoverThrottled = true;
|
||||
setTimeout(Util.bind(function () {
|
||||
|
Reference in New Issue
Block a user