List of usage examples for com.google.gwt.query.client.css CSS LEFT
EdgePositionProperty LEFT
To view the source code for com.google.gwt.query.client.css CSS LEFT.
Click Source Link
This property specifies how far a box's left content edge is offset to the right of the left edge of the box's containing block.
From source file:com.vaadin.addons.sliderlayout.gwt.client.VSliderLayout.java
License:Apache License
private void rollTo(String id, final int slideTo, String animation, int duration) { GQuery panel = $(SLIDE_DEFAULT_CLASS_NAME + "-" + uidlId); if (panel == null) return;/*from w ww.j a v a 2 s. c o m*/ if (panel.widgets().size() == 0) panel.css(CSS.LEFT, "0"); // animate slide to number panel.as(Effects) //.delay(1000) //.animate("left: -" + Integer.toString(100 * slideTo) + "%", 1000, EasingExt.EASE_OUT_BOUNCE, new Function() { // don't use 0% (only compatible with webkit browsers) for left property use 0px to be compatible with firefox and IE and opera !!! .animate("left: -" + Integer.toString(panel.outerWidth() * slideTo), duration, getEasing(animation), new Function() { boolean fistEvent = true; public void f(Element e) { // only send the first event from all slides movement if (fistEvent) { client.updateVariable(uidlId, "fromSlideName", lastSlideName, false); client.updateVariable(uidlId, "toSlideName", "v-slide-" + slideTo, true); // save the last Slide name lastSlideName = "v-slide-" + slideTo; fistEvent = false; } } }); }
From source file:gwtquery.samples.client.AnimationsSample.java
License:Apache License
public void onModuleLoad() { doMoveAnimation();/*from w ww . j a v a 2 s . co m*/ doColorAnimation(); $("#stopMove").click(new Function() { public void f() { $(".foo").clearQueue().stop(); } }); $("#stopColor").click(new Function() { public void f() { $(".foo").clearQueue("colorQueue"); } }); $("#startMove").click(new Function() { public void f() { $(".foo").css(CSS.LEFT.with(Length.px(0))); doMoveAnimation(); } }); $("#startColor").click(new Function() { public void f() { doColorAnimation(); } }); }