]> khamidou — GitHub mirrors - popcorn-js.git/commitdiff
Add suggested default values and extended manifest types [#461]
authorJon Buckley <jon@jbuckley.ca>
Mon, 29 Aug 2011 15:13:07 +0000 (11:13 -0400)
committerJon Buckley <jon@jbuckley.ca>
Mon, 29 Aug 2011 15:13:07 +0000 (11:13 -0400)
Conflicts:
plugins/timeline/popcorn.timeline.js

1  2 
plugins/timeline/popcorn.timeline.js

index c263d7a06d69d8b8a09dcc1a0454845a7001a344,3cee6b22f2e0f0e309a0846ee193cefec77c9419..c8638b2a31332431db2f7e001e6c13752007c672
  
      //  Default to up if options.direction is non-existant or not up or down
      options.direction = options.direction || "up";
 -    if ( options.direction.toLowerCase() !== "up" || options.direction.toLowerCase() !== "down" ) {
 -      options.direction = "up";
 -    }
 +    if ( options.direction.toLowerCase() === "down" ) {
  
 -    if ( target ) {
 -
 -      target.style.width = "400px";
 -      target.style.height = "200px";
 -      target.style.overflow = "auto";
 -      target.appendChild( newdiv );
 +      goingUp = false;
 +    }
  
 +    if ( target && container ) {
        // if this isnt the first div added to the target div
 -      if( options.direction.length === 2 ){
 +      if( goingUp ){
          // insert the current div before the previous div inserted
 -        target.insertBefore( newdiv, document.getElementById( "timelineDiv" + ( i - 1 ) ) );
 +        container.insertBefore( contentDiv, container.firstChild );
 +      }
 +      else {
 +        
 +        container.appendChild( contentDiv );
        }
  
+     } else if ( Popcorn.plugin.debug ) {
+       throw new Error( "target container doesn't exist" );
      }
      
      i++;