Apply corrections identified by SonarQube (#8457)
This commit is contained in:
parent
99cb83a9df
commit
964c60d086
73 changed files with 211 additions and 232 deletions
|
@ -116,12 +116,12 @@ export default class Tooltip extends React.Component<ITooltipProps> {
|
|||
? Math.min(parentBox.width, this.props.maxParentWidth)
|
||||
: parentBox.width
|
||||
);
|
||||
const baseTop = (parentBox.top - 2 + this.props.yOffset) + window.pageYOffset;
|
||||
const baseTop = (parentBox.top - 2 + this.props.yOffset) + window.scrollY;
|
||||
const top = baseTop + offset;
|
||||
const right = width - parentBox.left - window.pageXOffset;
|
||||
const left = parentBox.right + window.pageXOffset;
|
||||
const right = width - parentBox.left - window.scrollX;
|
||||
const left = parentBox.right + window.scrollX;
|
||||
const horizontalCenter = (
|
||||
parentBox.left - window.pageXOffset + (parentWidth / 2)
|
||||
parentBox.left - window.scrollX + (parentWidth / 2)
|
||||
);
|
||||
switch (this.props.alignment) {
|
||||
case Alignment.Natural:
|
||||
|
@ -154,7 +154,7 @@ export default class Tooltip extends React.Component<ITooltipProps> {
|
|||
break;
|
||||
case Alignment.TopRight:
|
||||
style.top = baseTop - 5;
|
||||
style.right = width - parentBox.right - window.pageXOffset;
|
||||
style.right = width - parentBox.right - window.scrollX;
|
||||
style.transform = "translate(5px, -100%)";
|
||||
break;
|
||||
case Alignment.TopCenter:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue