ui: Hack minimum screensize to fix heap profiles
Bug: 168048193
Change-Id: Ie84025bcd5bce455050472593a7dd1cf5c391bad
diff --git a/ui/src/controller/heap_profile_controller.ts b/ui/src/controller/heap_profile_controller.ts
index ea7357f..09092d4 100644
--- a/ui/src/controller/heap_profile_controller.ts
+++ b/ui/src/controller/heap_profile_controller.ts
@@ -324,8 +324,9 @@
getMinSizeDisplayed(flamegraphData: CallsiteInfo[], rootSize?: number):
number {
const timeState = globals.state.frontendLocalState.visibleState;
- const width =
- (timeState.endSec - timeState.startSec) / timeState.resolution;
+ let width = (timeState.endSec - timeState.startSec) / timeState.resolution;
+ // TODO(168048193): Remove screen size hack:
+ width = Math.max(width, 800);
if (rootSize === undefined) {
rootSize = findRootSize(flamegraphData);
}