Skip to content

Commit

Permalink
Merge branch 'dbFlower-master'
Browse files Browse the repository at this point in the history
  • Loading branch information
jabbany committed Sep 3, 2015
2 parents 50925d6 + 07c56f7 commit a8f4aea
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 17 deletions.
21 changes: 13 additions & 8 deletions build/CommentCoreLibrary.js
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ function CommentFilter(){
* Comment Core Library CommentManager
* @license MIT
* @author Jim Chen
*
*
* Copyright (c) 2014 Jim Chen
*/
var CommentManager = (function() {
Expand All @@ -692,7 +692,7 @@ var CommentManager = (function() {
}
return "matrix3d(" + matrix.join(",") + ")";
};

function CommentManager(stageObject){
var __timer = 0;
this._listeners = {};
Expand Down Expand Up @@ -824,30 +824,35 @@ var CommentManager = (function() {
};
CommentManager.prototype.init = function(){
this.setBounds();
if(this.filter == null)
if(this.filter == null) {
this.filter = new CommentFilter(); //Only create a filter if none exist
}
};
CommentManager.prototype.time = function(time){
time = time - 1;
if(this.position >= this.timeline.length || Math.abs(this.lastPos - time) >= 2000){
this.seek(time);
this.lastPos = time;
if(this.timeline.length <= this.position)
if(this.timeline.length <= this.position) {
return;
}
}else{
this.lastPos = time;
}
for(;this.position < this.timeline.length;this.position++){
if(this.options.limit > 0 && this.runline.length > this.limiter) break;
if(this.validate(this.timeline[this.position]) && this.timeline[this.position]['stime']<=time){
this.send(this.timeline[this.position]);
if(this.timeline[this.position]['stime']<=time){
if(this.options.limit > 0 && this.runline.length > this.limiter) {
continue; // Skip comments but still move the position pointer
} else if(this.validate(this.timeline[this.position])){
this.send(this.timeline[this.position]);
}
}else{
break;
}
}
};
CommentManager.prototype.rescale = function(){

};
CommentManager.prototype.send = function(data){
if(data.mode === 8){
Expand Down
Loading

0 comments on commit a8f4aea

Please sign in to comment.