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;
}
}
]
}
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;
}
}
]
}
- relates to
-
JDK-8105668 Timeline implementation can't set key values to current value on play()
-
- Resolved
-
-
JDK-8108565 Interpolator recalculates target on each iteration
-
- Closed
-