Java Code Examples for com.google.gwt.user.client.DOM#getAbsoluteLeft()
The following examples show how to use
com.google.gwt.user.client.DOM#getAbsoluteLeft() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NodeShape.java From EasyML with Apache License 2.0 | 6 votes |
protected int getContainerOffsetLeft() { if (containerOffsetLeft < 0 || !sync) { int scrollLeft = 0; Element parent = DOM.getParent(getWidget().getElement()); while (parent != null) { if (getScrollLeft(parent) > 0) { scrollLeft += getScrollLeft(parent); GWT.log("Scroll left detected : " + scrollLeft); } if (containerFinder.isContainer(parent)) { containerOffsetLeft = DOM.getAbsoluteLeft(parent) - scrollLeft; } parent = DOM.getParent(parent); } } return containerOffsetLeft; }