Hi, I'm trying to add a "Plus-One"-Button dynamically to some popups our webapp is using. I'm using the following code:
HTML google = new HTML("<g:plusone size=\"small\" > annotation=\"none\" href=\"http://somecutomurl.com\"></g:plusone>"); > > Document doc = Document.get(); > ScriptElement script = doc.createScriptElement(); > script.setSrc("https://apis.google.com/js/plusone.js"); > script.setType("text/javascript"); > script.setLang("javascript"); > doc.getBody().appendChild(script); > > DOM.setStyleAttribute(google.getElement(), "margin", "0 5px 0 > 0"); > > bottomLine.setCellHorizontalAlignment(google, > HasHorizontalAlignment.ALIGN_RIGHT); > bottomLine.setCellVerticalAlignment(google, > HasVerticalAlignment.ALIGN_MIDDLE); > bottomLine.add(google); > Where bottomLine is a HorizontalPanel which is added to the Popup afterwards. Adding it to the popup directly doesnt help. The code itself works, the button is added, BUT the Popup enlarges its size for a very short second when the button is added and gets back to normal size afterwards. It kind of shrugs for a very short moment, which is very annoying. I tried setting a fixed height and max-height for the surrounding div. And I tried to use the css "clip" attribute. Both not working. Also I tried using "AddThis"-JS-Library to add the button, same effect. Does anyone has any idea how I can make this work? I'm sure it can be done, I saw apps doing exactly the same ... Thanks! noise -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/MKC0AyG8v6wJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.