+ {visible.map((p, i) => {
+ const intensity = Math.min(1, p.count / maxCount);
+ const size = 24 + intensity * 36;
+ return (
+
+ );
+ })}
+
+ )}
- {showOverlay && (
-
- {visible.map((p, i) => {
- const intensity = Math.min(1, p.count / maxCount);
- const size = 24 + intensity * 36;
- return (
-
- );
- })}
-
- )}
{snapshot && (
@@ -560,12 +564,8 @@ function ReplaySnapshot({
void finalize();
});
- replayer.on('resize', (dimension: { width?: number; height?: number }) => {
- resizeReplayFrame(
- replayer,
- dimension.width && Number.isFinite(dimension.width) ? dimension.width : width,
- dimension.height && Number.isFinite(dimension.height) ? dimension.height : height,
- );
+ replayer.on('resize', () => {
+ resizeReplayFrame(replayer, width, height);
});
setTimeout(() => {
@@ -661,6 +661,12 @@ function resizeReplayFrame(replayer: ReplayInstance, width: number, height: numb
if (wrapper) {
wrapper.style.width = `${width}px`;
wrapper.style.height = `${height}px`;
+ wrapper.style.minWidth = `${width}px`;
+ wrapper.style.minHeight = `${height}px`;
+ wrapper.style.maxWidth = `${width}px`;
+ wrapper.style.maxHeight = `${height}px`;
+ wrapper.style.margin = '0';
+ wrapper.style.padding = '0';
wrapper.style.overflow = 'hidden';
}
@@ -669,6 +675,11 @@ function resizeReplayFrame(replayer: ReplayInstance, width: number, height: numb
iframe.setAttribute('height', String(height));
iframe.style.width = `${width}px`;
iframe.style.height = `${height}px`;
+ iframe.style.minWidth = `${width}px`;
+ iframe.style.minHeight = `${height}px`;
+ iframe.style.maxWidth = `${width}px`;
+ iframe.style.maxHeight = `${height}px`;
+ iframe.style.margin = '0';
iframe.style.display = 'block';
}
@@ -678,7 +689,7 @@ function resizeReplayFrame(replayer: ReplayInstance, width: number, height: numb
function EmptyState({ message }: { message?: string } = {}) {
return (