Folks,
I have a Canvas class for the purpose of displaying CloudMade Map (called thru JSNI) which needs a DIV ID sent to it.
I extended Canvas, and overrided getInnerHTML() to plant my div id.
All is well to display this map.
However, when I tab away from it (the Canvas is in a tab pane), the map is never hidden. How do I make this Canvas to be managed by SGWT?
I am using the latest build (Dec 14) from SGWT.
The same does not happen when using Google's MapWidget. That works fine.
I am sure I am missing some functionality at the Canvas level.
Thanks
Strawman
I have a Canvas class for the purpose of displaying CloudMade Map (called thru JSNI) which needs a DIV ID sent to it.
I extended Canvas, and overrided getInnerHTML() to plant my div id.
All is well to display this map.
However, when I tab away from it (the Canvas is in a tab pane), the map is never hidden. How do I make this Canvas to be managed by SGWT?
Code:
public class MapCanvas extends Canvas { public MapCanvas() { setRedrawOnResize(false); setAttribute("_redrawWithParent", false, false); setAttribute("_clearWithRemoveChild", true, false); setOverflow(Overflow.VISIBLE); } public String getInnerHTML() { return "<div id=\"mapCanvas_widget\" style=\"width: 800px; height: 600px\"></div>"; } }
The same does not happen when using Google's MapWidget. That works fine.
I am sure I am missing some functionality at the Canvas level.
Thanks
Strawman