Skip to content

Commit

Permalink
v13.6.5
Browse files Browse the repository at this point in the history
  • Loading branch information
boehlerlukas committed May 7, 2024
1 parent 0cd6afa commit 8b00b80
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 6 deletions.
2 changes: 1 addition & 1 deletion build/cjs/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion build/esm/index.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "gleap",
"version": "13.6.4",
"version": "13.6.5",
"main": "build/cjs/index.js",
"module": "build/esm/index.mjs",
"exports": {
Expand Down
1 change: 1 addition & 0 deletions published/13.6.5/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion published/latest/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/GleapConfigManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export default class GleapConfigManager {
try {
const config = JSON.parse(http.responseText);
try {
saveToGleapCache(`config-${session.sdkKey}-lang`, config);
saveToGleapCache(`config-${session.sdkKey}-${lang}`, config);
} catch (exp) { }
self.applyConfig(config);
return resolve();
Expand Down
11 changes: 10 additions & 1 deletion src/GleapTooltipManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,16 @@ export default class GleapTooltipManager {
tooltip.offsetY = 0;
}

const elementRect = element.getBoundingClientRect();
var elementRect = element.getBoundingClientRect();

try {
// Improve width calculation for text elements.
var range = document.createRange();
range.selectNodeContents(element);
const style = window.getComputedStyle(element);
elementRect.width = range.getBoundingClientRect().width + parseFloat(style.paddingLeft);
} catch (exp) { }

const anchorElement = document.querySelector(`[data-gleap-tooltip-anchor="${tooltipId}"]`);
const anchorRect = anchorElement.getBoundingClientRect();

Expand Down

0 comments on commit 8b00b80

Please sign in to comment.