[qooxdoo-bugs] [Bug 296] New: API viewer doesn't show selected tree node if parent not "open"
Brought to you by:
ecker,
martinwittemann
From: <bug...@qo...> - 2007-02-15 07:15:33
|
http://bugzilla.qooxdoo.org/show_bug.cgi?id=296 Summary: API viewer doesn't show selected tree node if parent not "open" Product: tools Version: 0.6.5 Platform: All URL: http://api.qooxdoo.org/current/#qx.type.Range OS/Version: All Status: NEW Severity: normal Priority: P3 Component: api AssignedTo: no...@qo... ReportedBy: hg...@ci... QAContact: qoo...@li... BugsThisDependsOn: 294 If you click on a link in the API viewer that takes you to another class, that class is loaded on the right hand side. In addition the tree node is selected. However, if the node was not displayed because the parent wasn't expanded, then you can't tell where the node is in the tree. As an example, click on the URL I've provided, then click on qx.core.Object. You can't tell where you are in the tree. Now, expand qx.core in the tree, go back to qx.type.Range, and click on qx.core.Object again - you will see it selected in the tree. I had to implement code to automatically open a selected node in the tree in our product - it goes something like this: // // Find all parent folders // var oTreeFolder = treeNode; var loParentFolders = []; // need to open folders in sequence from root while (oTreeFolder) // while we haven't gone off the top { oTreeFolder = oTreeFolder.getParentFolder(); // get parent loParentFolders.push(oTreeFolder); // remember parent }; // // Now open all folders, starting at the top // loParentFolders.pop(); // pop empty folder at end while (loParentFolders.length) // while we have some parents { loParentFolders.pop().open(); // get last one, and open it. }; This would be needed in apiviewer.Viewer.showClassNyName before the call to treeNode.setSelected(true) Maybe it would be better to add this to TreeFolder as a new API - something like "ensureVisible". See bug 294. Hugh -- Configure bugmail: http://bugzilla.qooxdoo.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug, or are watching the QA contact. |