cplayground icon indicating copy to clipboard operation
cplayground copied to clipboard

In Open Files debugger tab, make the diagram container fit the contents

Open reberhardt7 opened this issue 4 years ago • 0 comments

The Open Files debugger tab shows a diagram of the file descriptor / open file / vnode tables:

Screen Shot 2020-04-17 at 11 19 30 PM

The size of the diagram container is currently hardcoded: https://github.com/reberhardt7/cplayground/blob/6366368c28ab820d4bad9d81eed5012469339747/src/client/components/Diagram.tsx#L82 That means that if there are not many processes running, there's weird horizontal scrolling behavior (you can scroll really far to the right, where there's nothing showing on the diagram), and if there are a lot of processes running, then they potentially get clipped on the diagram. We should dynamically compute the width/height needed to show the diagram, and use that instead of hardcoding.

reberhardt7 avatar Apr 18 '20 06:04 reberhardt7