Package com.google.gwt.query.client

Examples of com.google.gwt.query.client.GQuery.offset()


    Element ce = $containement.get(0);
    if (ce == null) {
      return;
    }

    containment = impl.calculateContainment(this, $containement.offset(), ce,
        (!"hidden".equals($containement.css("overflow"))));

  }

  private Offset calculateParentOffset(Element element) {
View Full Code Here


        .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()));
      }
    }
    $(draggableElement).data(SNAP_ELEMENTS_KEY, snapElements);
View Full Code Here

    GQuery scrollParent = handler.getHelperScrollParent();
    Element scrollParentElement = scrollParent.get(0);
    if (scrollParentElement != null
        && scrollParentElement != $(GQuery.document).get(0)
        && !"html".equalsIgnoreCase(scrollParentElement.getTagName())) {
      Offset scrollParentOffset = scrollParent.offset();
      $(ctx.getDraggable()).data(OVERFLOW_OFFSET_KEY, scrollParentOffset);
    }
  }

  public void onStop(DraggableHandler handler, DragContext ctx, GqEvent e) {
View Full Code Here

        if (additionalOffset != null) {
            finalTop += additionalOffset.top;
            finalLeft += additionalOffset.left;
        }

        tooltip.offset((int) finalTop, (int) finalLeft);
        tooltip.addClass(placementClass)
                .addClass(style.in());
    }

    public void toggle() {
View Full Code Here

  public void testEffectsShouldBeQueued() {
    $(e).html("<p id='idtest'>Content 1</p></p>");

    final GQuery g = $("#idtest").css("position", "absolute");
    final Offset o = g.offset();

    final int duration = 1000;
    g.as(Effects).
        animate($$("left: '+=100'"), duration, EasingCurve.linear).
        animate($$("top: '+=100'"), duration, EasingCurve.linear).
View Full Code Here

        if (additionalOffset != null) {
            finalTop += additionalOffset.top;
            finalLeft += additionalOffset.left;
        }

        tooltip.offset((int) finalTop, (int) finalLeft);
        tooltip.addClass(placementClass)
                .addClass(style.in());

        if (options.getTrigger() == TooltipTrigger.CLICK && options.isAutoClose()) {
            $(document).delay(1, new Function() {
View Full Code Here

                placementClass = style.right();
                break;
        }

        //TODO use GQuery.offset() method when it will be implemented
        tooltip.offset((int) finalTop, (int) finalLeft);
        tooltip.addClass(placementClass)
                .addClass(style.in());
    }

    public void toggle() {
View Full Code Here

        if (additionalOffset != null) {
            finalTop += additionalOffset.top;
            finalLeft += additionalOffset.left;
        }

        tooltip.offset((int) finalTop, (int) finalLeft);
        tooltip.addClass(placementClass)
                .addClass(style.in());
    }

    public void toggle() {
View Full Code Here

        if (additionalOffset != null) {
            finalTop += additionalOffset.top;
            finalLeft += additionalOffset.left;
        }

        tooltip.offset((int) finalTop, (int) finalLeft);
        tooltip.addClass(placementClass)
                .addClass(style.in());
    }

    public void toggle() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.