reberhardt7 / cplayground

GNU General Public License v3.0
118 stars 14 forks source link

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

Open reberhardt7 opened 4 years ago

reberhardt7 commented 4 years ago

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.