Skip to content

Commit 1616657

Browse files
committed
Temporarily fix #55 before code restructure
1 parent 610e20b commit 1616657

File tree

3 files changed

+15
-7
lines changed

3 files changed

+15
-7
lines changed

build/CommentCoreLibrary.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,10 @@ var CommentManager = (function() {
695695

696696
function CommentManager(stageObject){
697697
var __timer = 0;
698+
698699
this._listeners = {};
700+
this._lastPosition = 0;
701+
699702
this.stage = stageObject;
700703
this.options = {
701704
global:{
@@ -721,6 +724,7 @@ var CommentManager = (function() {
721724
reverse:new CommentSpaceAllocator(0,0),
722725
scrollbtm:new CommentSpaceAllocator(0,0)
723726
};
727+
724728
/** Precompute the offset width **/
725729
this.width = this.stage.offsetWidth;
726730
this.height = this.stage.offsetHeight;
@@ -830,14 +834,14 @@ var CommentManager = (function() {
830834
};
831835
CommentManager.prototype.time = function(time){
832836
time = time - 1;
833-
if(this.position >= this.timeline.length || Math.abs(this.lastPos - time) >= 2000){
837+
if(this.position >= this.timeline.length || Math.abs(this.lastPosition - time) >= 2000){
834838
this.seek(time);
835-
this.lastPos = time;
839+
this._lastPosition = time;
836840
if(this.timeline.length <= this.position) {
837841
return;
838842
}
839843
}else{
840-
this.lastPos = time;
844+
this._lastPosition = time;
841845
}
842846
for(;this.position < this.timeline.length;this.position++){
843847
if(this.timeline[this.position]['stime']<=time){

0 commit comments

Comments
 (0)