added an option to tweak the speed with which a sliderWidget minimizes itself.
--- 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 ?
}
};
--- 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) {