Example usage for com.google.gwt.query.client GQuery outerHeight

List of usage examples for com.google.gwt.query.client GQuery outerHeight

Introduction

In this page you can find the example usage for com.google.gwt.query.client GQuery outerHeight.

Prototype

public int outerHeight() 

Source Link

Document

Get the current computed height for the first element in the set of matched elements, including padding, border, but not the margin.

Usage

From source file:com.arcbees.chosen.client.ChosenImpl.java

License:Apache License

private int positionRelativeToBoundaries() {
    Element dropdownBoundaries = options.getDropdownBoundaries();
    if (dropdownBoundaries == null) {
        dropdownBoundaries = options.getDropdownBoundariesProvider().getDropdownBoundaries();
    }/* w ww  .  j  a  v  a  2s  . c o m*/
    GQuery ddContainer = $(dropdownBoundaries);
    int ddContainerOffsetTop = ddContainer.offset().top;
    int containerOffsetTop = container.offset().top;
    int spaceAbove = containerOffsetTop - ddContainerOffsetTop;

    int spaceBelow = ddContainer.outerHeight() - spaceAbove - container.outerHeight();
    int ddHeight = dropdown.outerHeight();
    return spaceBelow < ddHeight ? positionAbove() : positionBelow();
}

From source file:gwtquery.plugins.draggable.client.plugins.SnapPlugin.java

License:Apache License

public void onStart(DraggableHandler handler, DragContext ctx, GqEvent e) {
    Element draggableElement = ctx.getDraggable();
    List<SnapElement> snapElements = new ArrayList<SnapElement>();
    GQuery snap = (handler.getOptions().getSnap_$() != null ? handler.getOptions().getSnap_$()
            : $(handler.getOptions().getSnap()));

    for (Element element : snap.elements()) {
        if (element != draggableElement) {
            GQuery $element = $(element);
            snapElements.add(new SnapElement($element.offset(), $element.outerWidth(), $element.outerHeight()));
        }/*from   www . j  a va 2  s.c  om*/
    }
    $(draggableElement).data(SNAP_ELEMENTS_KEY, snapElements);

}