Closed mirisb closed 2 months ago
Thanks for reporting this. We did some package updates recently to use the wellog with node 20 and we've noticed some side effects, the issue with tracks needing a refresh to become visible is possibly one of those, We've noticed the same when doing hot reload. A workaround for now is to add a logViewer.reset() between the init() and setTracks().
The storybook examples need a bigger update in general to work with newer packages, the storybook version used now is very old. Adding the stracked tracks to the example can of course be done.
The stacked track width issue is probably a math error in the plot code, it seems to only happen for certain widths. Will add a card for this in our backlog.
The easiest way to test this is to open the well-log in full screen, open the inspect tool and then change the width of the inspect tool.
@mirisb This has been (at least mostly) fixed now. There might still be some issues with the width, but the issues remaining would need a huge rewrite to fix, so we hope that this smaller fix is sufficient.
@VRiveland Thank you. This is a minor bug yet very annoying. I hope this fix will be enough.
Description When resizing stacked track within a log viewer component the rendered stacked log sometimes doesn't fit the width of the track, and is either 1-2 pixel less or 1 pixel extra than the width.
Steps required to recreate issue I recreated this on videx well log by adding two stacked logs to the tracks given to the Wellog Component story:
Expected behavior
Screenshots The problem with log width more than track width:
The problem with log width less than track width:
![image](https://github.com/equinor/videx-wellog/assets/18436935/320af65b-30e5-4e85-a9ff-a76a105c7963)
Desktop (please complete the following information):