HanSolo / medusa

A JavaFX library for Gauges
Apache License 2.0
692 stars 131 forks source link

setvalue does not work while animating #150

Open zaferaydn opened 6 years ago

zaferaydn commented 6 years ago

I could not make it work that setting the value of gauge while it is still animating. I use following code to create the gauge:

Gauge gauge = GaugeBuilder.create() .decimals(0) .prefSize(75, 75) .skinType(Gauge.SkinType.FLAT) .animated(true) .minValue(0) .maxValue(100) .value(0) .valueColor(Color.WHITE) .build();

Then I set the value to 70. gauge.setValue(70); While value is being set with animation, I set it to 10 by a button click. gauge.setValue(10); But value is not being set to 10 after animation. In the documantation it says that:

Sets the value of the Gauge to the given double. If animated == true this value will be the end value after the animation is finished.

I understand It should set the value just after animation ends. Is it right? How can achive setting value while animation is still progress?