Hello folks,
I'm having a slight problem with the menuwidth and itemwidth with a tree control. For example, if one were to download the tree example avalable here: http://milonic.com/treemenu/tree/, remove the style tags (they seem to override item/menu width's) and set the width, you'll notice that as each sub-menu (child) shows up relative to its parent it'll create its own subarea (div?) which doesn't comply with the menu width. The problem seems to be that when a child doesn't recalculat to be the width of the parent minus the horizontal offset.
Is this an option that I may have missed, or is this truly a problem? Please let me know if my explanation made no sense so that I can create a sample application for you.
On a side node, is the treemenu module "production ready?" I wasn't 100% sure based on the description below:
The TreeMenu.js module is currently at version 1.24 and getting better all the time. This latest release is almost workable. Still lots to do on the Tree Menu but the collapsible is almost there.
I've also tried a basic menu on one of our Apples (Safari) and had no problems visually or with the code.
Thank you,
Boris
Treemenu Width Problem?
Hi,
Note that the current version of the tree is 1.26, available here. Please make sure you're running that and the current version (5.769) of the menu code.
Note that the current version of the tree is 1.26, available here. Please make sure you're running that and the current version (5.769) of the menu code.
John
Thanks for the reply, John. I changed the JS file (and as far as I know I'm using the latest menu code), and the problem is still there.John wrote:Hi,
Note that the current version of the tree is 1.26, available here. Please make sure you're running that and the current version (5.769) of the menu code.
Since a picture is worth a thousand words, I put a border around two child menus to illustrate what I meant in my original post:

Thank you,
Boris
Quick update...
I was able to create a workaround by making a copy of the main style and just removing the offset from each root node. I'm not extatic about this solution.
I'm curious, though, whether instead of setting an itemwidth it's possible to just set the menuwidth at the root node level and make sure that all nodes itemwidth's are adjusted to fit into the menuwidth.
Again, I'm sorry if this feature already exists, but if it doesn't, it certainly would be nice.
I'll still monitor this thread in case a cleaner solution is offered by somebody.
Thank you,
Boris
I was able to create a workaround by making a copy of the main style and just removing the offset from each root node. I'm not extatic about this solution.
Code: Select all
child1Style=new copyOf(treeStyle);
child1Style.itemwidth = treeStyle.itemwidth - treeOffset;
child2Style=...
Again, I'm sorry if this feature already exists, but if it doesn't, it certainly would be nice.
I'll still monitor this thread in case a cleaner solution is offered by somebody.
Thank you,
Boris