Chrome上的GWT DeckLayoutPanel动画进入无限循环 [英] GWT DeckLayoutPanel animation goes into infinite loop on Chrome

查看:97
本文介绍了Chrome上的GWT DeckLayoutPanel动画进入无限循环的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

以下代码会在Chrome的最新(24.0.1312.52)版本中产生无限动画。与FF / IE相同的代码运行良好。

  public class Test实现EntryPoint {
@Override
public void onModuleLoad(){
DeckLayoutPanel deck = new DeckLayoutPanel();
deck.setWidth(100%);
deck.setHeight(100px);
deck.setAnimationDuration(3000);
deck.setWidget(新标签(Hello world));

RootLayoutPanel.get()。add(deck);






$ b

其他人也遇到过这个问题吗? p>

解决方案

这是GWT 2.4中的一个错误,由于Chrome中的更改,其中 requestAnimationFrame 现在使用亚毫秒定时器。这已在GWT 2.5.0中修复。



请参阅 https://groups.google.com/d/topic/google-web-toolkit/UBWsvHYM4SE https://plus.google.com/113357348071579443502/posts/apHjmAcynRa 等。

Following code results in the infinite animation on the latest (24.0.1312.52) version of Chrome. Same code runs well with FF/IE.

public class Test implements EntryPoint {
@Override
public void onModuleLoad() {
    DeckLayoutPanel deck = new DeckLayoutPanel();
    deck.setWidth("100%");
    deck.setHeight("100px");
    deck.setAnimationDuration(3000);
    deck.setWidget(new Label("Hello world"));

    RootLayoutPanel.get().add(deck);
}
}

Has anyone else encountered this problem as well?

解决方案

This is a bug in GWT 2.4 due to a change in Chrome where requestAnimationFrame now uses sub-milliseconds timers. This has been fixed in GWT 2.5.0.

See https://groups.google.com/d/topic/google-web-toolkit/UBWsvHYM4SE and https://plus.google.com/113357348071579443502/posts/apHjmAcynRa, among others.

这篇关于Chrome上的GWT DeckLayoutPanel动画进入无限循环的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆