Skip to content

Commit 8b00b80

Browse files
committed
v13.6.5
1 parent 0cd6afa commit 8b00b80

File tree

7 files changed

+16
-6
lines changed

7 files changed

+16
-6
lines changed

build/cjs/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/esm/index.mjs

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "gleap",
3-
"version": "13.6.4",
3+
"version": "13.6.5",
44
"main": "build/cjs/index.js",
55
"module": "build/esm/index.mjs",
66
"exports": {

published/13.6.5/index.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

published/latest/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GleapConfigManager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export default class GleapConfigManager {
8585
try {
8686
const config = JSON.parse(http.responseText);
8787
try {
88-
saveToGleapCache(`config-${session.sdkKey}-lang`, config);
88+
saveToGleapCache(`config-${session.sdkKey}-${lang}`, config);
8989
} catch (exp) { }
9090
self.applyConfig(config);
9191
return resolve();

src/GleapTooltipManager.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,16 @@ export default class GleapTooltipManager {
299299
tooltip.offsetY = 0;
300300
}
301301

302-
const elementRect = element.getBoundingClientRect();
302+
var elementRect = element.getBoundingClientRect();
303+
304+
try {
305+
// Improve width calculation for text elements.
306+
var range = document.createRange();
307+
range.selectNodeContents(element);
308+
const style = window.getComputedStyle(element);
309+
elementRect.width = range.getBoundingClientRect().width + parseFloat(style.paddingLeft);
310+
} catch (exp) { }
311+
303312
const anchorElement = document.querySelector(`[data-gleap-tooltip-anchor="${tooltipId}"]`);
304313
const anchorRect = anchorElement.getBoundingClientRect();
305314

0 commit comments

Comments
 (0)