erich.wanker Posted October 9, 2014 Posted October 9, 2014 Hello folks ... i am searching a solution (i think javascript is the right way - but not my strength) for following situation: if a uniForm is shown (Or Create) - it should be created on -> main.width + newform. width when - it schould animate to -> trunc (main.width / 2) - ( newform. width / 2 ) and uniForm before close - it should animate to negative value of newform.width .. and if it reaches the position - it should close .. in small words: onShow or OnCreate - it slides in from right to middle of the screen onBeforeClose - it slided out and close itselfe Can someone please help me :-) ... ThanX Erich Quote
erich.wanker Posted October 13, 2014 Author Posted October 13, 2014 Hello :-) i found a small solution: function window.beforeclose(panel, eOpts) { panel.animate({ duration: 300, to: { x:-1000, opacity: 0} }); } function window.beforeshow(sender, eOpts) { sender.animate({ duration: 0, to: { x:2000, opacity: 0} }); sender.animate({ duration: 300, to: { x:200, opacity: 100} }); } Now i have additional questions: in function "window.beforeshow" : How can i set the first value of "x" to Mainform.width + 100 ... so the form is out of the browser-area How can i set the second value of "x" to trunc( (Mainform.width/2) - (the form.width/2) ) ... so the form is in the middle of the screen AND... ..is it possible to add this "Slide in / Slide out" - Effect to a message Dialog ? .. would be cool ;-) ThanX for suggestions Quote
jozef Posted April 3, 2017 Posted April 3, 2017 i used of this code. i want to place left of the form at the center of screen. how to do this? function window.beforeshow(sender, eOpts) { sender.animate({ duration: 200, to: { x:450, opacity: 100} }); } Quote
mhmda Posted April 5, 2017 Posted April 5, 2017 I use GSAP library: https://greensock.com/gsap 1 Quote
jozef Posted April 5, 2017 Posted April 5, 2017 i dont need gsap. i just want to change above code. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.