# HG changeset patch # User hamidouk # Date 1322738505 -3600 # Node ID 33a435f355976c08bb82d02b812b06f3791d697c # Parent 3da43513e638aff05513923f33b526ae9990b3d5 added an option to tweak the speed with which a sliderWidget minimizes itself. diff -r 3da43513e638 -r 33a435f35597 src/js/site.js --- a/src/js/site.js Thu Dec 01 12:08:19 2011 +0100 +++ b/src/js/site.js Thu Dec 01 12:21:45 2011 +0100 @@ -25,6 +25,9 @@ "TweetsWidget" : { default_profile_picture : "https://si0.twimg.com/sticky/default_profile_images/default_profile_1_normal.png", tweet_display_period: 10000 // how long do we show a tweet ? + }, + "SliderWidget" : { + minimize_period: 850 // how long does the slider stays maximized after the user leaves the zone ? } }; diff -r 3da43513e638 -r 33a435f35597 src/js/widgets/sliderWidget.js --- a/src/js/widgets/sliderWidget.js Thu Dec 01 12:08:19 2011 +0100 +++ b/src/js/widgets/sliderWidget.js Thu Dec 01 12:21:45 2011 +0100 @@ -107,8 +107,9 @@ /* handles when the mouse leaves the slider */ IriSP.SliderWidget.prototype.mouseOutHandler = function(event) { - - this.timeOutId = window.setTimeout(IriSP.wrap(this, this.minimizeOnTimeout), 3000); + + this.timeOutId = window.setTimeout(IriSP.wrap(this, this.minimizeOnTimeout), + IriSP.widgetsDefaults.SliderWidget.minimize_period); }; IriSP.SliderWidget.prototype.minimizeOnTimeout = function(event) {