mirror of https://github.com/twbs/bootstrap.git
				
				
				
			pass more args to placement function
This commit is contained in:
		
							parent
							
								
									a2c263493a
								
							
						
					
					
						commit
						356227ef50
					
				| 
						 | 
				
			
			@ -90,7 +90,8 @@
 | 
			
		|||
 | 
			
		||||
        actualWidth = $tip[0].offsetWidth
 | 
			
		||||
        actualHeight = $tip[0].offsetHeight
 | 
			
		||||
        placement = _.maybeCall(this.options.placement, this.$element[0])
 | 
			
		||||
 | 
			
		||||
        placement = maybeCall(this.options.placement, this, [ $tip[0], this.$element[0] ])
 | 
			
		||||
 | 
			
		||||
        switch (placement) {
 | 
			
		||||
          case 'below':
 | 
			
		||||
| 
						 | 
				
			
			@ -193,15 +194,10 @@
 | 
			
		|||
 /* TWIPSY PRIVATE METHODS
 | 
			
		||||
  * ====================== */
 | 
			
		||||
 | 
			
		||||
   var _ = {
 | 
			
		||||
 | 
			
		||||
     maybeCall: function ( thing, ctx ) {
 | 
			
		||||
       return (typeof thing == 'function') ? (thing.call(ctx)) : thing
 | 
			
		||||
     }
 | 
			
		||||
 | 
			
		||||
   function maybeCall ( thing, ctx, args ) {
 | 
			
		||||
     return typeof thing == 'function' ? thing.apply(ctx, args) : thing
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 /* TWIPSY PLUGIN DEFINITION
 | 
			
		||||
  * ======================== */
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue