Chrome上的GWT DeckLayoutPanel动画进入无限循环 [英] GWT DeckLayoutPanel animation goes into infinite loop on Chrome
问题描述
以下代码会在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屋!