]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
Merge remote branch 'scott/style' into 0.6
authorAnna Sobiepanek <annaopensource at gmail.com>
Tue, 17 May 2011 16:08:53 +0000 (12:08 -0400)
committerAnna Sobiepanek <annaopensource at gmail.com>
Tue, 17 May 2011 16:08:53 +0000 (12:08 -0400)
Conflicts:
popcorn.js

1  2 
popcorn.js

diff --cc popcorn.js
index b827b888d30275e6cfccee4d64c1af9ccaca4f63,be5b3965e6bbe8a2a5e150e56ec95f74428ecfad..e2b8de6b97bc3ac11c9c2ea4714220b100f86046
          bounds[ p ] = Math.round( clientRect[ p ] );
        }
  
 -      return Popcorn.extend({}, bounds, { top: top, left: left } );
 +      return Popcorn.extend({}, bounds, { top: top, left: left });     
 +    }, 
 +
 +    disable: function( instance, plugin ) {
 +
 +      var disabled = instance.data.disabled;
 +      
 +      if ( disabled.indexOf( plugin ) === -1 ) {
 +        disabled.push( plugin );
 +      }
++
 +      return instance;
 +    },
 +    enable: function( instance, plugin ) {
 +
 +      var disabled = instance.data.disabled, 
 +          index = disabled.indexOf( plugin );
 +
 +      if ( index > -1 ) {
 +        disabled.splice( index, 1 );
 +      }
++
 +      return instance;
      }
    });
  
  
      //  Store this definition in an array sorted by times
      var byStart = obj.data.trackEvents.byStart,
 -        byEnd   = obj.data.trackEvents.byEnd;
 -
 -    for ( var idx = byStart.length - 1; idx >= 0; idx-- ) {
 +        byEnd = obj.data.trackEvents.byEnd, 
 +        idx;
 +   
 +    for ( idx = byStart.length-1; idx >= 0; idx-- ) {
  
        if ( track.start >= byStart[idx].start ) {
-         byStart.splice( idx+1, 0, track );
+         byStart.splice( idx + 1, 0, track );
          break;
        }
      }
 -
 -    for ( var idx = byEnd.length - 1; idx >= 0; idx-- ) {
 +   
 +    for ( idx = byEnd.length-1; idx >= 0; idx-- ) {
  
        if ( track.start >= byEnd[idx].start ) {
-         byEnd.splice( idx+1, 0, track );
+         byEnd.splice( idx + 1, 0, track );
          break;
        }
      }