williamtroup / JsonTree.js

🔗 A lightweight JavaScript library that generates customizable tree views to better visualize, and edit, JSON data.
https://www.william-troup.com/jsontree-js/
MIT License
257 stars 9 forks source link

Json tree container does not stretch to full screen width #27

Closed mountaindude closed 2 months ago

mountaindude commented 2 months ago

Describe the bug In 2.1.0 I can get the tree container in a web page to fill the entire width of the browser tab. In 2.2.0 the container only fits part of the tab, to the left. Same HTML code used in both cases.

Some new CSS that overrides previous behaviour? The issue remains in later versions too.

To Reproduce Steps to reproduce the behavior: Serve the HTML below using version 2.1.0 and 2.2.0. Notice the difference.

Expected behavior Should be possible to stretch the tree container to full width.

Screenshots 2.1.0

image

2.2.0

image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

williamtroup commented 2 months ago

A max-width CSS property was added, which you can override.

mountaindude commented 2 months ago

Confirmed that max-width works.