0

我正在尝试在我的网站谷歌地图上实现平移(拖放)功能。为此,我使用标准鼠标事件(mousedown、mousemove、mouseup)。

它可以在浏览器内移动鼠标时工作,即使在仍然平移时离开浏览器也是如此,因为浏览器甚至可以在浏览器之外识别鼠标事件。但是在将鼠标移到 Firebug 控制台上时它不起作用。

当鼠标在 Firebug 控制台上移动时,Google 地图也会停止平移,但它如何知道鼠标何时在那里?它需要知道它,因为如果我不释放鼠标按钮并移回地图,则平移不再处于活动状态。那么 google-map 是如何知道鼠标何时进入控制台的呢?

4

1 回答 1

0

It's not Google Maps that knows about the mouse cursor being over the Firebug window.

Instead I suspect it's Firebug catching and cancelling the mousemove and mouseover event.

于 2014-02-19T14:21:40.477 回答