mirror of
https://github.com/tenrok/bootstrap.git
synced 2026-06-20 20:00:36 +03:00
pass more args to placement function
This commit is contained in:
Vendored
+4
-8
@@ -90,7 +90,8 @@
|
|||||||
|
|
||||||
actualWidth = $tip[0].offsetWidth
|
actualWidth = $tip[0].offsetWidth
|
||||||
actualHeight = $tip[0].offsetHeight
|
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) {
|
switch (placement) {
|
||||||
case 'below':
|
case 'below':
|
||||||
@@ -193,15 +194,10 @@
|
|||||||
/* TWIPSY PRIVATE METHODS
|
/* TWIPSY PRIVATE METHODS
|
||||||
* ====================== */
|
* ====================== */
|
||||||
|
|
||||||
var _ = {
|
function maybeCall ( thing, ctx, args ) {
|
||||||
|
return typeof thing == 'function' ? thing.apply(ctx, args) : thing
|
||||||
maybeCall: function ( thing, ctx ) {
|
|
||||||
return (typeof thing == 'function') ? (thing.call(ctx)) : thing
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* TWIPSY PLUGIN DEFINITION
|
/* TWIPSY PLUGIN DEFINITION
|
||||||
* ======================== */
|
* ======================== */
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user