ui: fix heatmap scaling (use true document height)

This commit is contained in:
nick-delirium 2025-03-11 17:00:42 +01:00
parent 3245579b7c
commit c7f3c78740
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
3 changed files with 4 additions and 6 deletions

View file

@ -67,8 +67,8 @@ function WebPlayer(props: any) {
setTimeout(() => {
contextValue.player.pause();
contextValue.player.jump(jumpTimestamp);
contextValue.player.scale();
setTimeout(() => {
contextValue.player.scale();
contextValue.player.showClickmap(insights);
}, 250);
}, 250);

View file

@ -59,7 +59,6 @@ function PageInsightsPanel({ setActiveTab }: Props) {
? insightsFilters.url
: urlOptions[0].value;
Player.pause();
markTargets(null);
void fetchSessionClickmap(sessionId, {
...insightsFilters,
sessionId,

View file

@ -260,10 +260,9 @@ export default class Screen {
break;
case ScaleMode.AdjustParentHeight:
// we want to scale the document with true height so the clickmap will be scrollable
const usedHeight = `${height}px`;
// this.document?.body.scrollHeight && this.document?.body.scrollHeight > height
// ? this.document.body.scrollHeight + 'px'
// : height + 'px';
const usedHeight = this.document?.body.scrollHeight && this.document?.body.scrollHeight > height
? this.document.body.scrollHeight + 'px'
: height + 'px';
this.scaleRatio = offsetWidth / width;
translate = 'translate(-50%, 0)';
posStyles = { top: 0, height: usedHeight };