开发者

Making a GWT widget transparent to events

I'm trying to draw a map, with some text annotations on top.

I've got this all working, but the text annotations (which are Label widgets floating over the top of the GWTCanvas which the map is drawn on) are soaking up any event开发者_Go百科s which I'd like to get passed through to the canvas underneath. This is particularly obvious when the user drags the map; moving the mouse pointer over one of the widgets cases an Out event to be sent to the canvas, thus ending the drag.

Is there any way I can tell the Label not to respond to any events, and instead pass them on to the widget underneath?

Belated edit: turns out that pointer-events: none does what I want; but it's pretty new and may not work on some browsers...


No. The only thing you can do is catch the events and pass them through the event handler.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜