mirror of
https://github.com/zhuzichu520/FluentUI.git
synced 2024-11-26 13:27:05 +08:00
Merge pull request #574 from lucky9loogn/fix
尝试修复 FluChart 和 FluProgressBar 的一些问题
This commit is contained in:
commit
8ab0cde2e9
@ -15,7 +15,9 @@ Canvas {
|
|||||||
function animateToNewData()
|
function animateToNewData()
|
||||||
{
|
{
|
||||||
chartAnimationProgress = 0.1;
|
chartAnimationProgress = 0.1;
|
||||||
d.jsChart?.update();
|
if (d.jsChart) {
|
||||||
|
d.jsChart.update();
|
||||||
|
}
|
||||||
chartAnimator.restart();
|
chartAnimator.restart();
|
||||||
}
|
}
|
||||||
QtObject{
|
QtObject{
|
||||||
|
@ -41,16 +41,18 @@ ProgressBar{
|
|||||||
height: parent.height
|
height: parent.height
|
||||||
radius: d._radius
|
radius: d._radius
|
||||||
color: control.color
|
color: control.color
|
||||||
PropertyAnimation on x {
|
SequentialAnimation on x {
|
||||||
id: animator_x
|
id: animator_x
|
||||||
running: control.indeterminate && control.visible
|
running: control.indeterminate && control.visible
|
||||||
|
loops: Animation.Infinite
|
||||||
|
PropertyAnimation {
|
||||||
from: -rect_progress.width
|
from: -rect_progress.width
|
||||||
to: control.width + rect_progress.width
|
to: control.width + rect_progress.width
|
||||||
loops: Animation.Infinite
|
|
||||||
duration: control.duration
|
duration: control.duration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
FluText{
|
FluText{
|
||||||
text:(control.visualPosition * 100).toFixed(0) + "%"
|
text:(control.visualPosition * 100).toFixed(0) + "%"
|
||||||
visible: {
|
visible: {
|
||||||
|
@ -14,7 +14,9 @@ Canvas {
|
|||||||
function animateToNewData()
|
function animateToNewData()
|
||||||
{
|
{
|
||||||
chartAnimationProgress = 0.1;
|
chartAnimationProgress = 0.1;
|
||||||
d.jsChart?.update();
|
if (d.jsChart) {
|
||||||
|
d.jsChart.update();
|
||||||
|
}
|
||||||
chartAnimator.restart();
|
chartAnimator.restart();
|
||||||
}
|
}
|
||||||
QtObject{
|
QtObject{
|
||||||
|
@ -42,16 +42,18 @@ ProgressBar{
|
|||||||
height: parent.height
|
height: parent.height
|
||||||
radius: d._radius
|
radius: d._radius
|
||||||
color: control.color
|
color: control.color
|
||||||
PropertyAnimation on x {
|
SequentialAnimation on x {
|
||||||
id: animator_x
|
id: animator_x
|
||||||
running: control.indeterminate && control.visible
|
running: control.indeterminate && control.visible
|
||||||
|
loops: Animation.Infinite
|
||||||
|
PropertyAnimation {
|
||||||
from: -rect_progress.width
|
from: -rect_progress.width
|
||||||
to: control.width + rect_progress.width
|
to: control.width + rect_progress.width
|
||||||
loops: Animation.Infinite
|
|
||||||
duration: control.duration
|
duration: control.duration
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
FluText{
|
FluText{
|
||||||
text:(control.visualPosition * 100).toFixed(0) + "%"
|
text:(control.visualPosition * 100).toFixed(0) + "%"
|
||||||
visible: {
|
visible: {
|
||||||
|
Loading…
Reference in New Issue
Block a user