-
Notifications
You must be signed in to change notification settings - Fork 86
mdc-tab-bar-scroller__indicator misplaced #281
Comments
@ESKI Thanks for reporting the spelling issue. PR available I'm looking into the tab-bar-scroller issue as well. Let ya know in a bit. |
There's also an issue in the toolbar component. If i have a fixed toolbar with two mdc-toolbar__row, the margin-top who was associated to the body is incorrect. |
@ESKI I'm testing the original issue regarding tab indicator positioning, and not able yet to duplicate. Which OS and browser are you using? I'll re-test in SauceLabs using your setup. |
I'am using Win10, Chrome version 62.0.3202.62. I created a new angular project with your angular-mdc-web v0.5.3. You have to open the inspector and disable cache in the network tab or to set a delay with fast 3g to make the Roboto font render after the initialization of the components. then you will notice the wrong position of the tab indicator when you select another tab, specially the last one. |
Ah, Toolbar was the missing ingredient 😄 |
Good to hear it :) It would be great also if you could add a property for mdc-toolbar component to disable the adding of margin-top to the body and then in the setStyleForFixedAdjustElement function just check the state of this property like this for example :
|
Good idea. I'll add this. |
PR for |
I'll re-test the original issue for scrollbar indicator alignment today using the latest version. |
Issue remains with |
Resolving this in pull request #369 |
All set. Once merged, I'll close the issue. |
- [x] Add `disabled` tab - [x] Fix `[active]` property changes not propagating #349 - [x] Fix `mdc-tab-bar-scroller__indicator` misplaced issue #281 - [x] Remove `mdc-tab-bar-scroll-button` directive #### mdc-tab * Add `disabled: boolean` property to `mdc-tab` * Refactor `active` property * Add `changeDetection: ChangeDetectionStrategy.OnPush` * Add `preserveWhitespaces: false` * Add `getComputedWidth(): number`; return the computed width for tab. * Add `getComputedLeft(): number`; return the computed left offset for tab. * Add `isActive()` return true if tab is active. * Add `setActive(boolean)`; set tab active property to value passed. * Add `getPreventDefaultOnClick(): boolean`; return true if the tab prevents the default click action. * Add `setPreventDefaultOnClick(boolean)`; sets tabs `preventDefaultOnClick` property to the value passed. * Add `measureSelf()`; sets computedWidth and computedLeft for a tab. #### mdc-tab-bar * Add `getComputedWidth(): number` * Add `layout(): void` * Add `changeDetection: ChangeDetectionStrategy.OnPush` * Add `preserveWhitespaces: false` * Add `getActiveTabIndex(): number` * Add `switchToTabAtIndex(index: number, shouldNotify: boolean = true)` * Add `MdcTabBarIndicator` directive * Add `setPreventDefaultOnClickForTabAtIndex(index: number, preventDefaultOnClick: boolean)` * Add `isDefaultPreventedOnClickForTabAtIndex(index: number): boolean` #### mdc-tab-bar-scroller * Add `layout()` * Add `changeDetection: ChangeDetectionStrategy.OnPush` * Add `preserveWhitespaces: false` * Add `scrollBack(event?: Event)` * Add `scrollForward(event?: Event)` * Remove `mdc-tab-bar-scroll-button` directive BREAKING CHANGE: Removed `mdc-tab-bar-scroll-button` directive. Use `mdc-icon` instead. Please update your code accordingly. Example: ```html <mdc-tab-bar-scroll-back> <mdc-icon>navigate_before</mdc-icon> </mdc-tab-bar-scroll-back> ``` Closes #349 Closes #147 Closes #281
Hi,
I start using angular-mdc lately and i notice an issue in mdc-tab-bar-scroller.
The mdc-tab-bar-scroller__indicator is not positioned correctly because the width of the mdc-tab change after Roboto has been applied. If you resize the page the mdc-tab-bar-scroller__indicator will set correctly.
Here a screenshot:
You can see the width of mdc-tab-bar-scroller__indicator is longer then the mdc-tab
By the way, you have an error in tab-bar-scroller component, you called the class "mdc-tab-bar-scoller" instead of "mdc-tab-bar-scroller", you forgot the R.
I'm using version 0.5.3
The text was updated successfully, but these errors were encountered: