Keyboard shortcuts optimizations (#70, #109)

This commit is contained in:
RainLoop Team 2014-04-08 23:22:17 +04:00
parent 0b30bac43f
commit 05f455c34e
17 changed files with 400 additions and 264 deletions

File diff suppressed because one or more lines are too long

View file

@ -336,6 +336,23 @@
*/
NanoScroll.prototype.scrollClassTimer = 0;
NanoScroll.prototype.scrollClassTrigger = function() {
window.clearTimeout(this.scrollClassTimer);
var _this = this;
_this.pane.addClass('activescroll');
_this.pane2.addClass('activescroll');
this.scrollClassTimer = window.setTimeout(function () {
_this.pane.removeClass('activescroll');
_this.pane2.removeClass('activescroll');
}, 1000);
};
NanoScroll.prototype.nativeScrolling = function() {
this.$content.css({
WebkitOverflowScrolling: 'touch'
@ -366,7 +383,7 @@
this.sliderTop = this.contentScrollTop * this.maxSliderTop / this.maxScrollTop;
this.slider2Left = this.contentScroll2Left * this.maxSlider2Left / this.maxScroll2Left;
}
};
};
/**
Creates event related methods
@ -471,6 +488,10 @@
}
_this.$el.trigger('scrolltop');
}
if (!_this.iOSNativeScrolling) {
_this.scrollClassTrigger();
}
},
/**
* @param {{wheelDeltaY:number, delta:number}} e

View file

@ -95,7 +95,7 @@
height : 5px;
}
.nano:hover > .pane, .nano:hover > .pane2, .pane.active, .pane2.active, .pane.flashed, .pane2.flashed {
.nano:hover > .pane, .nano:hover > .pane2, .pane.activescroll, .pane2.activescroll, .pane.active, .pane2.active, .pane.flashed, .pane2.flashed {
visibility : visible\9; /* Target only IE7 and IE8 with this hack */
opacity : 0.99;
filter: alpha(opacity=99);