chore(css): fix transform prefixes

This commit is contained in:
Adam Bradley
2016-12-08 11:31:09 -06:00
parent 071ad2ef3f
commit 5ba09a1b78
3 changed files with 8 additions and 12 deletions

View File

@@ -1,6 +1,6 @@
import { Directive, ElementRef } from '@angular/core';
import { rafFrames } from '../../util/dom';
import { CSS, rafFrames } from '../../util/dom';
import { Tab } from './tab';
/**
@@ -16,9 +16,9 @@ export class TabHighlight {
select(tab: Tab) {
rafFrames(3, () => {
let d = tab.btn.getDimensions();
let ele = this._elementRef.nativeElement;
ele.style.transform = 'translate3d(' + d.left + 'px,0,0) scaleX(' + d.width + ')';
const d = tab.btn.getDimensions();
const ele = this._elementRef.nativeElement;
(<any>ele.style)[CSS.transform] = `translate3d(${d.left}px,0,0) scaleX(${d.width})`;
if (!this._init) {
this._init = true;

View File

@@ -1,6 +1,6 @@
import { App } from '../app/app';
import { Config } from '../../config/config';
import { PointerCoordinates, nativeTimeout, rafFrames } from '../../util/dom';
import { CSS, PointerCoordinates, nativeTimeout, rafFrames } from '../../util/dom';
import { ActivatorBase, isActivatedDisabled } from './activator-base';
@@ -106,11 +106,7 @@ export class Activator implements ActivatorBase {
let ele: HTMLElement;
for (var i = 0; i < this._active.length; i++) {
ele = this._active[i];
if (!animated) {
ele.style.transition = 'none';
} else {
ele.style.transition = '';
}
ele.style[CSS.transition] = animated ? '' : 'none';
ele.classList.remove(this._css);
}
this._active.length = 0;

View File

@@ -442,7 +442,7 @@ export class ScrollView {
if (!self._el || !self.isScrolling || attempts > maxAttempts) {
self.isScrolling = false;
self._el.style.transform = ``;
(<any>self._el.style)[CSS.transform] = '';
done();
return;
}
@@ -468,7 +468,7 @@ export class ScrollView {
} else {
self.isScrolling = false;
self._el.style.transform = ``;
(<any>self._el.style)[CSS.transform] = '';
done();
}
}