Announcement
Collapse
No announcement yet.
X
-
When you add a button to a Layout, it doesn't necessary draw() synchronously, but you can call reflowNow() to cause it be drawn immediately. Then it will accept animation.
Leave a comment:
-
Animation of a Button just added to a layout
Hello Isomorphic,
I have the requirement to add a button to a layout and animate immediately after its adding. But the animation does not work. I have created a testcase:
After pressing the button "Add animated button" the button "this button should be animated directly after adding" is added to the layout, but without the animation. The animation code itself works well on the button after it was created. To check this, I have added the second button "animate created button".Code:function animateButton() { animatedButton.animateFade(0, function () { animatedButton.animateFade(100, function () { animatedButton.animateFade(0, function () { animatedButton.animateFade(100) }, 600) }, 600) }); } isc.HLayout.create({ ID: "naviagtionLayout", width: "100%", height: "100%", members: [ isc.VLayout.create({ width: "50%", height: "100%", showResizeBar: true, members: [ isc.Button.create({ title: "Add animated button", width: 200, click: function () { naviagtionLayout.addMember( isc.Button.create({ ID: "animatedButton", width: 200, title: "this button should be animated directly after adding" })); animateButton(); } }), isc.Button.create({ title: "animate created button", width: 200, click: function () { animateButton(); } }) ] })] });
How can I add a button to a layout and animate it?
Regards Thomas
P.S. Same behavior in 7.0 RC2 and 8 betaTags: None
Leave a comment: