Jump to content

animate window onShow / onClose


erich.wanker

Recommended Posts

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

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

  • 2 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...