|
|
|
|
|
|
__webpack_require__.r(__webpack_exports__); |
|
|
|
/* WEBPACK VAR INJECTION */(function(global) {/**! |
|
|
|
* @fileOverview Kickass library to create and place poppers near their reference elements. |
|
|
|
* @version 1.14.6 |
|
|
|
* @version 1.14.7 |
|
|
|
* @license |
|
|
|
* Copyright (c) 2016 Federico Zivolo and contributors |
|
|
|
* |
|
|
|
|
|
if (getStyleComputedProperty(element, 'position') === 'fixed') { |
|
|
|
return true; |
|
|
|
} |
|
|
|
return isFixed(getParentNode(element)); |
|
|
|
var parentNode = getParentNode(element); |
|
|
|
if (!parentNode) { |
|
|
|
return false; |
|
|
|
} |
|
|
|
return isFixed(parentNode); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
|
|
var _data$offsets = data.offsets, |
|
|
|
popper = _data$offsets.popper, |
|
|
|
reference = _data$offsets.reference; |
|
|
|
var round = Math.round, |
|
|
|
floor = Math.floor; |
|
|
|
|
|
|
|
|
|
|
|
var isVertical = ['left', 'right'].indexOf(data.placement) !== -1; |
|
|
|
var isVariation = data.placement.indexOf('-') !== -1; |
|
|
|
var sameWidthOddness = reference.width % 2 === popper.width % 2; |
|
|
|
var bothOddWidth = reference.width % 2 === 1 && popper.width % 2 === 1; |
|
|
|
var noRound = function noRound(v) { |
|
|
|
return v; |
|
|
|
}; |
|
|
|
|
|
|
|
var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthOddness ? Math.round : Math.floor; |
|
|
|
var verticalToInteger = !shouldRound ? noRound : Math.round; |
|
|
|
var referenceWidth = round(reference.width); |
|
|
|
var popperWidth = round(popper.width); |
|
|
|
|
|
|
|
var isVertical = ['left', 'right'].indexOf(data.placement) !== -1; |
|
|
|
var isVariation = data.placement.indexOf('-') !== -1; |
|
|
|
var sameWidthParity = referenceWidth % 2 === popperWidth % 2; |
|
|
|
var bothOddWidth = referenceWidth % 2 === 1 && popperWidth % 2 === 1; |
|
|
|
|
|
|
|
var horizontalToInteger = !shouldRound ? noRound : isVertical || isVariation || sameWidthParity ? round : floor; |
|
|
|
var verticalToInteger = !shouldRound ? noRound : round; |
|
|
|
|
|
|
|
return { |
|
|
|
left: horizontalToInteger(bothOddWidth && !isVariation && shouldRound ? popper.left - 1 : popper.left), |
0 comments on commit
77e3b13