|
@ -128,13 +128,13 @@ Range.prototype.setRange = function(start, end, animate) { |
|
|
var now = new Date().valueOf(); |
|
|
var now = new Date().valueOf(); |
|
|
var time = now - initTime; |
|
|
var time = now - initTime; |
|
|
var done = time > duration; |
|
|
var done = time > duration; |
|
|
var s = done ? start : util.easeInOutQuad(time, initStart, _start, duration); |
|
|
|
|
|
var e = done ? end : util.easeInOutQuad(time, initEnd, _end, duration); |
|
|
|
|
|
|
|
|
var s = (done || _start === null) ? _start : util.easeInOutQuad(time, initStart, _start, duration); |
|
|
|
|
|
var e = (done || _end === null) ? _end : util.easeInOutQuad(time, initEnd, _end, duration); |
|
|
|
|
|
|
|
|
changed = me._applyRange(s, e); |
|
|
changed = me._applyRange(s, e); |
|
|
anyChanged = anyChanged || changed; |
|
|
anyChanged = anyChanged || changed; |
|
|
if (changed) { |
|
|
if (changed) { |
|
|
me.body.emitter.emit('rangechange', {start: new Date(s), end: new Date(e)}); |
|
|
|
|
|
|
|
|
me.body.emitter.emit('rangechange', {start: new Date(me.start), end: new Date(me.end)}); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (done) { |
|
|
if (done) { |
|
|