use directories for structure

This commit is contained in:
s2
2020-05-26 10:37:57 +02:00
parent 66580d4847
commit ae4aaf2668
1287 changed files with 92093 additions and 13113 deletions

View File

@@ -71,8 +71,8 @@ export default function arrow(data, options) {
// Compute the sideValue using the updated popper offsets
// take popper margin in account because we don't have this info available
const css = getStyleComputedProperty(data.instance.popper);
const popperMarginSide = parseFloat(css[`margin${sideCapitalized}`], 10);
const popperBorderSide = parseFloat(css[`border${sideCapitalized}Width`], 10);
const popperMarginSide = parseFloat(css[`margin${sideCapitalized}`]);
const popperBorderSide = parseFloat(css[`border${sideCapitalized}Width`]);
let sideValue =
center - data.offsets.popper[side] - popperMarginSide - popperBorderSide;

View File

@@ -13,7 +13,7 @@ export default function getBordersSize(styles, axis) {
const sideB = sideA === 'Left' ? 'Right' : 'Bottom';
return (
parseFloat(styles[`border${sideA}Width`], 10) +
parseFloat(styles[`border${sideB}Width`], 10)
parseFloat(styles[`border${sideA}Width`]) +
parseFloat(styles[`border${sideB}Width`])
);
}

View File

@@ -13,8 +13,8 @@ export default function getOffsetRectRelativeToArbitraryNode(children, parent, f
const scrollParent = getScrollParent(children);
const styles = getStyleComputedProperty(parent);
const borderTopWidth = parseFloat(styles.borderTopWidth, 10);
const borderLeftWidth = parseFloat(styles.borderLeftWidth, 10);
const borderTopWidth = parseFloat(styles.borderTopWidth);
const borderLeftWidth = parseFloat(styles.borderLeftWidth);
// In cases where the parent is fixed, we must ignore negative scroll in offset calc
if(fixedPosition && isHTML) {
@@ -35,8 +35,8 @@ export default function getOffsetRectRelativeToArbitraryNode(children, parent, f
// differently when margins are applied to it. The margins are included in
// the box of the documentElement, in the other cases not.
if (!isIE10 && isHTML) {
const marginTop = parseFloat(styles.marginTop, 10);
const marginLeft = parseFloat(styles.marginLeft, 10);
const marginTop = parseFloat(styles.marginTop);
const marginLeft = parseFloat(styles.marginLeft);
offsets.top -= borderTopWidth - marginTop;
offsets.bottom -= borderTopWidth - marginTop;