Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8109451

Animation interpolation takes shorter time than expected

    XMLWordPrintable

Details

    Description

      When using following timeline, the rotation takes about 1sec (instead of 5). If I use label.rotate => 0 or don't use the frame at 0 sec at all it works correctly. This is a blocker for the JavaFX Composer since we use the animation to get from any state of UI (I mean the label.rotate property can have whatever value) to a particular state. The same animation shall be used multiple times. The code code below has been suggested as a workaround in RT-6759 but apparently it doesn't work.

                      javafx.animation.Timeline {
                          keyFrames: [
                              javafx.animation.KeyFrame {
                                  time: 0s
                                  values: [
                                      label.rotate => label.rotate tween javafx.animation.Interpolator.DISCRETE,
                                  ]
                              }
                                javafx.animation.KeyFrame {
                                  time: 5000ms
                                  values: [
                                      label.rotate => 180 tween javafx.animation.Interpolator.LINEAR,
                                  ]
                                  action: function() {
                                      button.disable = false;
                                      button2.disable = false;
                                  }
                              }
                          ]
                      }

      Attachments

        Issue Links

          Activity

            People

              bchristi Brent Christian
              mryzljfx Martin Ryzl (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported: