Opened 11 years ago
Closed 11 years ago
#10223 closed defect (worksforme)
adding new tab to tabContainer using javascript doesn't work
Reported by: | vorun | Owned by: | anonymous |
---|---|---|---|
Priority: | blocker | Milestone: | tbd |
Component: | Dijit | Version: | 1.4.0b |
Keywords: | Cc: | ||
Blocked By: | Blocking: |
Description (last modified by )
dijit.layout.ScrollingTabController?
The function below doesn't work because dojo.style(n, "width") below
_getScrollForSelectedTab: function(){ // summary: // Returns the scroll value setting so that the selected tab // will appear in the center var w = this.scrollNode, n = this._selectedTab, scrollNodeWidth = dojo.style(this.scrollNode, "width"), scrollBounds = this._getScrollBounds(); // TODO: scroll minimal amount (to either right or left) so that // selected tab is fully visible, and just return if it's already visible? var pos = (n.offsetLeft + dojo.style(n, "width")/2) - scrollNodeWidth/2; pos = Math.min(Math.max(pos, scrollBounds.min), scrollBounds.max); // TODO: // If scrolling close to the left side or right side, scroll // all the way to the left or right. See this._minScroll. // (But need to make sure that doesn't scroll the tab out of view...) return pos; },
Change History (1)
comment:1 Changed 11 years ago by
Component: | General → Dijit |
---|---|
Description: | modified (diff) |
Resolution: | → worksforme |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
test_TabContainer.html has a test for adding tabs and it seems to work fine.
As I've written in every single bug that you've filed, you need to supply a test case.