Project

General

Profile

Actions

Bug #1643

closed

WStackedWidget with animation fails on setCurrentIndex() when previous animation/transition is not yet complete

Added by Anonymous over 11 years ago. Updated about 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Start date:
01/24/2013
Due date:
% Done:

0%

Estimated time:

Description

The display is not updated to reflect the internal state of WStackedWidget if setCurrentIndex() is called while an animation from a previous setCurrentIndex() is ongoing. I believe that the problem is related to visibility of animateChild(). For the affected application, this patch to Wt 3.2.3 seemed to work:

diff -u a/src/js/WStackedWidget.js b/src/js/WStackedWidget.js
--- a/src/js/WStackedWidget.js
+++ b/src/js/WStackedWidget.js
@@ -190,7 +190,7 @@ WT_DECLARE_WT_MEMBER
       */
      if ($(from).hasClass("in")) {
        $(from).one(animationEventEnd, function() {
-          animateChild(child, effects, timing, duration, style);
+          Wt.WT.WStackedWidget.prototype.animateChild(child, effects, timing, duration, style);
         });
        return;
      }
Actions #1

Updated by Wim Dumon about 11 years ago

  • Status changed from New to Feedback

We cannot reproduce this. Can you create a minimal test case please?

BR,

Wim.

Actions #2

Updated by Bruce Toll about 11 years ago

Thanks for following-up. An easy way to demo this problem is to modify the wt-homepage example. If you increase the duration of the animation from 250 ms to 3000 ms (line 127 in Home.C in v3.2.3), it should be reproducible if you rapidly switch between menu items with the mouse

Without the patch, you should see errors on the javascript console (animateChild is not defined) and the correct menu state will not be displayed.

Thanks for a great product!

Actions #3

Updated by Wim Dumon about 11 years ago

  • Status changed from Feedback to Resolved

Fixed in internal branch, will appear in git soon.

Wim.

Actions #4

Updated by Koen Deforche about 11 years ago

  • Status changed from Resolved to Closed
  • Assignee set to Wim Dumon
  • Target version set to 3.3.0
Actions

Also available in: Atom PDF