XWidgetSoft Forum

XWidget & XLaunchpad , Desktop customization
It is currently May 10th, 2025, 3:20 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: SlidePanel delay
PostPosted: August 2nd, 2014, 5:15 pm 
Offline

Joined: July 4th, 2013, 11:57 pm
Posts: 5
Hi.
I've made a slidepanel that goes down when the cursor point to the widget's active area (!SlidePanelInOut=MeteoPanel).
What should I make to slide the panel down only if the cursor remains on this area for, let us say, 3 seconds? And not immediately (+ switch animation) as it does now.

And to make the panel auto slide-in 5 sec. later?

Thanx.


Top
 Profile  
 
 Post subject: Re: SlidePanel delay
PostPosted: August 4th, 2014, 11:42 am 
Offline

Joined: October 26th, 2013, 8:17 am
Posts: 362
you can use below code in script code to do this:

Code:
var s1,s2

function widgetOnEnter()
{
   s1=setTimeout("slidergodown",3000)
}

function slidergodown()
{
   clearTimeout(s2)
   slidepanel1.Slided=1
   s2=setTimeout("slidergoup",5000)
}

function slidergoup()
{
   slidepanel1.Slided=0
}

function widgetOnLeave()
{
   clearTimeout(s1)
}

Note:
you should link [widgetOnEnter] and [widgetOnLeave] function names to the their events in the widget's events tab (Right Sidebar)



edit:
corrected some mistakes in code, plz reuse


Top
 Profile  
 
 Post subject: Re: SlidePanel delay
PostPosted: August 6th, 2014, 6:32 am 
Offline

Joined: July 4th, 2013, 11:57 pm
Posts: 5
hamid, Thank you.
After adding semicolons it's work fine.


Top
 Profile  
 
 Post subject: Re: SlidePanel delay
PostPosted: August 6th, 2014, 6:40 am 
Offline

Joined: October 26th, 2013, 8:17 am
Posts: 362
masha wrote:
After adding semicolons it's work fine.

i think javascript doesn't need semicolons,
so i'm confused, why it's not worked for you without it?
which version of windows are you using?
does it have any errors in designer's log?


Top
 Profile  
 
 Post subject: Re: SlidePanel delay
PostPosted: August 7th, 2014, 6:02 am 
Offline

Joined: July 4th, 2013, 11:57 pm
Posts: 5
Windows 7, all updates
Log error: Line # Char # expected ;

Anyway the problem with slider resolved. Thank you.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Powered by phpBB® Forum Software © phpBB Group