diff options
Diffstat (limited to 'examples/declarative/snow/snow.qml')
-rw-r--r-- | examples/declarative/snow/snow.qml | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/examples/declarative/snow/snow.qml b/examples/declarative/snow/snow.qml index 2b413bb..f65e0ac 100644 --- a/examples/declarative/snow/snow.qml +++ b/examples/declarative/snow/snow.qml @@ -27,11 +27,12 @@ Rect { property real targetDeform: 0 property bool slowDeform: true - property real deform - deform: Follow { source: MyLayout.targetDeform; velocity: MyLayout.slowDeform?0.1:2 } + property real deform: 0 + deform: Follow { + id: "DeformFollow"; source: MyLayout.targetDeform; velocity: MyLayout.slowDeform?0.1:2 + onSyncChanged: if(inSync) { MyLayout.slowDeform = true; MyLayout.targetDeform = 0; } + } - onDeformChanged: if(deform == targetDeform) { slowDeform = true; targetDeform = 0; } - ImageBatch { offset: 0; ref: ImagePanel } x: Follow { source: MyLayout.targetX; velocity: 1000 } |