mbraak / jqTree

Tree widget for jQuery
https://mbraak.github.io/jqTree/
Apache License 2.0
1.02k stars 177 forks source link

No icon when line is broken with "buttonLeft: false" #667

Closed odungern closed 2 years ago

odungern commented 2 years ago

When a tree entry does not exceed one line, the icon (open/close handle) is shown to the right: grafik

When a tree entry exceeds one line, the icon disappears and it is impossible to show the children: grafik

Expected: The icon/handle is shown also when the tree entry exceeds one line.

Used: jqTree v1.6.1 (js, css) with fix for #662

odungern commented 2 years ago

If this is getting difficult, don't bother. The button-right option is just a 'nice-to-have'.

mbraak commented 2 years ago

I'll have a look

mbraak commented 2 years ago

This is what I get with the default css:

Schermafbeelding 2021-10-20 om 14 56 37

The button is aligned to the right, but only when the title is on multiple lines. I don't know why that is.

When I remove display: flex; from the ul.jqtree-tree .jqtree-element element, I get:

Schermafbeelding 2021-10-20 om 15 01 45

This looks better. Perhaps this is a good option when the button is on the right. Could you try if this works for you?

odungern commented 2 years ago

yes, in my case it works nicely. When slowly reducing the width of the window, the handle/icon jumps to the next line together with the last word of the text (rather than first the handle and a little later the last word), which is best.

grafik

Thanks a lot - css is endless fiddling ;-)