@@ -667,7 +667,7 @@ function CommentFilter(){
667667 * Comment Core Library CommentManager
668668 * @license MIT
669669 * @author Jim Chen
670- *
670+ *
671671 * Copyright (c) 2014 Jim Chen
672672 */
673673var CommentManager = ( function ( ) {
@@ -692,7 +692,7 @@ var CommentManager = (function() {
692692 }
693693 return "matrix3d(" + matrix . join ( "," ) + ")" ;
694694 } ;
695-
695+
696696 function CommentManager ( stageObject ) {
697697 var __timer = 0 ;
698698 this . _listeners = { } ;
@@ -824,30 +824,35 @@ var CommentManager = (function() {
824824 } ;
825825 CommentManager . prototype . init = function ( ) {
826826 this . setBounds ( ) ;
827- if ( this . filter == null )
827+ if ( this . filter == null ) {
828828 this . filter = new CommentFilter ( ) ; //Only create a filter if none exist
829+ }
829830 } ;
830831 CommentManager . prototype . time = function ( time ) {
831832 time = time - 1 ;
832833 if ( this . position >= this . timeline . length || Math . abs ( this . lastPos - time ) >= 2000 ) {
833834 this . seek ( time ) ;
834835 this . lastPos = time ;
835- if ( this . timeline . length <= this . position )
836+ if ( this . timeline . length <= this . position ) {
836837 return ;
838+ }
837839 } else {
838840 this . lastPos = time ;
839841 }
840842 for ( ; this . position < this . timeline . length ; this . position ++ ) {
841- if ( this . options . limit > 0 && this . runline . length > this . limiter ) break ;
842- if ( this . validate ( this . timeline [ this . position ] ) && this . timeline [ this . position ] [ 'stime' ] <= time ) {
843- this . send ( this . timeline [ this . position ] ) ;
843+ if ( this . timeline [ this . position ] [ 'stime' ] <= time ) {
844+ if ( this . options . limit > 0 && this . runline . length > this . limiter ) {
845+ continue ; // Skip comments but still move the position pointer
846+ } else if ( this . validate ( this . timeline [ this . position ] ) ) {
847+ this . send ( this . timeline [ this . position ] ) ;
848+ }
844849 } else {
845850 break ;
846851 }
847852 }
848853 } ;
849854 CommentManager . prototype . rescale = function ( ) {
850-
855+
851856 } ;
852857 CommentManager . prototype . send = function ( data ) {
853858 if ( data . mode === 8 ) {
0 commit comments