erich.wanker Posted October 9, 2014 Share 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 Link to comment Share on other sites More sharing options...
erich.wanker Posted October 13, 2014 Author Share 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 Link to comment Share on other sites More sharing options...
jozef Posted April 3, 2017 Share 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} }); } Link to comment Share on other sites More sharing options...
jozef Posted April 4, 2017 Share Posted April 4, 2017 hello. isn't someone here? Link to comment Share on other sites More sharing options...
mhmda Posted April 5, 2017 Share Posted April 5, 2017 I use GSAP library: https://greensock.com/gsap 1 Link to comment Share on other sites More sharing options...
jozef Posted April 5, 2017 Share Posted April 5, 2017 i dont need gsap. i just want to change above code. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now