summaryrefslogtreecommitdiffstats
path: root/doc/src/declarative/advtutorial.qdoc
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2010-07-13 09:33:02 (GMT)
committerMartin Smith <martin.smith@nokia.com>2010-07-13 09:33:02 (GMT)
commite305732c0df93332a514a957b08e0ce283cb747f (patch)
tree603522227e5d4e9f2994408afd5d5523951ba648 /doc/src/declarative/advtutorial.qdoc
parentc93c9bbfe94cd271aeda9e2730d343e3eee31ec5 (diff)
parenta296749eaea94ae4ed36086b632d32c87d3d99c9 (diff)
downloadQt-e305732c0df93332a514a957b08e0ce283cb747f.zip
Qt-e305732c0df93332a514a957b08e0ce283cb747f.tar.gz
Qt-e305732c0df93332a514a957b08e0ce283cb747f.tar.bz2
Fixing merge conflicts.
Merge branch '4.7-upstream' into 4.7 Conflicts: doc/src/declarative/advtutorial.qdoc src/declarative/graphicsitems/qdeclarativeloader.cpp src/declarative/graphicsitems/qdeclarativetextedit.cpp src/declarative/qml/qdeclarativeengine.cpp src/declarative/util/qdeclarativexmllistmodel.cpp
Diffstat (limited to 'doc/src/declarative/advtutorial.qdoc')
-rw-r--r--doc/src/declarative/advtutorial.qdoc11
1 files changed, 5 insertions, 6 deletions
diff --git a/doc/src/declarative/advtutorial.qdoc b/doc/src/declarative/advtutorial.qdoc
index 740f6f9..1341bbb 100644
--- a/doc/src/declarative/advtutorial.qdoc
+++ b/doc/src/declarative/advtutorial.qdoc
@@ -314,18 +314,17 @@ In anticipation of the new block animations, \c Block.qml file is now renamed to
\section3 Animating block movement
First we will animate the blocks so that they move in a fluid manner. QML has a number of methods for adding fluid
-movement, and in this case we're going to use the \l SpringFollow element to add an animation with a spring-like
-movement. In \c BoomBlock.qml, we apply a \l SpringFollow
-to the \c x and \c y properties so that the block will follow and animate its movement towards the
-position specified by the new \c targetX and \c targetY properties (whose values will be set by \c samegame.js).
-Here is the code added to \c BoomBlock.qml:
+movement, and in this case we're going to use the \l Behavior element to add a \l SpringAnimation.
+In \c BoomBlock.qml, we apply a \l SpringAnimation behavior to the \c x and \c y properties so that the
+block will follow and animate its movement in a spring-like fashion towards the specified position (whose
+values will be set by \c samegame.js).Here is the code added to \c BoomBlock.qml:
\snippet declarative/tutorials/samegame/samegame4/content/BoomBlock.qml 1
The \c spring and \c damping values can be changed to modify the spring-like effect of the animation.
The \c {enabled: spawned} setting refers to the \c spawned value that is set from \c createBlock() in \c samegame.js.
-This ensures the \l SpringFollow on the \c x is only enabled after \c createBlock() has set the block to
+This ensures the \l SpringAnimation on the \c x is only enabled after \c createBlock() has set the block to
the correct position. Otherwise, the blocks will slide out of the corner (0,0) when a game begins, instead of falling
from the top in rows. (Try commenting out \c {enabled: spawned} and see for yourself.)