From: Anna Sobiepanek Date: Tue, 17 May 2011 16:08:53 +0000 (-0400) Subject: Merge remote branch 'scott/style' into 0.6 X-Git-Tag: v0.6~2^2~7 X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=b70c7fcd3634eb1a33e6fdc36b463045433b86d7;p=popcorn-js.git Merge remote branch 'scott/style' into 0.6 Conflicts: popcorn.js --- b70c7fcd3634eb1a33e6fdc36b463045433b86d7 diff --cc popcorn.js index b827b88,be5b396..e2b8de6 --- a/popcorn.js +++ b/popcorn.js @@@ -376,27 -356,7 +377,29 @@@ 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; } }); @@@ -628,21 -578,20 +630,21 @@@ // 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; } }