stop() before animate()
This commit is contained in:
parent
8e6df3d054
commit
2c82f51120
1 changed files with 4 additions and 4 deletions
|
@ -779,10 +779,10 @@ Ox.Calendar = function(options, self) {
|
|||
var delta = (date - self.options.date) / 1000 * getPixelsPerSecond(),
|
||||
// 250 ms for half the width of the visible area
|
||||
ms = 250 * Math.min(Math.abs(delta) / (self.$content.width() / 2), 1);
|
||||
self.$scalebar.animate({
|
||||
self.$scalebar.stop().animate({
|
||||
marginLeft: -delta + 'px'
|
||||
}, ms);
|
||||
self.$content.animate({
|
||||
self.$content.stop().animate({
|
||||
marginLeft: -delta + 'px'
|
||||
}, ms, function() {
|
||||
self.$scalebar.stop().css({marginLeft: 0});
|
||||
|
@ -791,7 +791,7 @@ Ox.Calendar = function(options, self) {
|
|||
self.options.date = date;
|
||||
renderCalendar();
|
||||
});
|
||||
self.$scrollbar.animate({
|
||||
self.$scrollbar.stop().animate({
|
||||
marginLeft: -delta / getScrollbarFactor() + 'px'
|
||||
}, ms);
|
||||
if (!Ox.isUndefined(line)) {
|
||||
|
@ -964,7 +964,7 @@ Ox.Calendar = function(options, self) {
|
|||
delta = top - scrollTop,
|
||||
ms = 250 * Math.min(Math.abs(delta) / (containerHeight / 2), 1);
|
||||
if (animate) {
|
||||
self.$container.animate({
|
||||
self.$container.stop().animate({
|
||||
scrollTop: top
|
||||
}, ms);
|
||||
} else {
|
||||
|
|
Loading…
Reference in a new issue