From kde-commits Thu May 13 00:50:14 2010 From: =?utf-8?q?Aaron=20J=2E=20Seigo?= Date: Thu, 13 May 2010 00:50:14 +0000 To: kde-commits Subject: KDE/kdeexamples/plasma/javascript/plasmoids/animations Message-Id: <20100513005014.E34EDAC8B4 () svn ! kde ! org> X-MARC-Message: https://marc.info/?l=kde-commits&m=127371151316410 SVN commit 1126031 by aseigo: show how javascript animations work A contents/animations (directory) A contents/animations/foo.js M +17 -0 contents/code/main M +3 -0 metadata.desktop --- trunk/KDE/kdeexamples/plasma/javascript/plasmoids/animations/contents/code/main #1126030:1126031 @@ -136,5 +136,22 @@ // animation group button.clicked.connect(rotateLabelsAnimationGroup.start) +function test() +{ + print("testing the anim"); + if (anim) { + anim.start() + } +} + +button = new PushButton() +button.text = 'Javascript Zoom' +layout.addItem(button) +var anim = animation("Foo") +if (anim) { + anim.targetWidget = button + button.clicked.connect(anim.start) +} + // add some space at the bottom of the widget layout.addStretch(10) --- trunk/KDE/kdeexamples/plasma/javascript/plasmoids/animations/metadata.desktop #1126030:1126031 @@ -15,3 +15,6 @@ X-KDE-PluginInfo-License=BSD X-KDE-PluginInfo-EnabledByDefault=true X-Plasma-API=javascript + +[Animations] +foo.js=Foo