refactor(segment): added MD styling to copy tabs, minus the animations

references #283
This commit is contained in:
Brandy Carney
2015-10-14 12:30:51 -04:00
parent a0b8f6f537
commit 94c93d7468
6 changed files with 157 additions and 78 deletions

View File

@ -226,3 +226,37 @@ export class SegmentButton {
}
}
// TODO Android animation similar to tabs
// /**
// * @private
// * TODO
// */
// @Directive({
// selector: 'tab-highlight'
// })
// class TabHighlight {
// constructor(@Host() tabs: Tabs, config: IonicConfig, elementRef: ElementRef) {
// if (config.get('mode') === 'md') {
// tabs.highlight = this;
// this.elementRef = elementRef;
// }
// }
//
// select(tab) {
// setTimeout(() => {
// let d = tab.btn.getDimensions();
// let ele = this.elementRef.nativeElement;
// ele.style.transform = 'translate3d(' + d.left + 'px,0,0) scaleX(' + d.width + ')';
//
// if (!this.init) {
// this.init = true;
// setTimeout(() => {
// ele.classList.add('animate');
// }, 64)
// }
// }, 32);
// }
//
// }