diff --git a/src/components/tabs/tab-highlight.ts b/src/components/tabs/tab-highlight.ts index 4c8177771a..15068105ff 100644 --- a/src/components/tabs/tab-highlight.ts +++ b/src/components/tabs/tab-highlight.ts @@ -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; + (ele.style)[CSS.transform] = `translate3d(${d.left}px,0,0) scaleX(${d.width})`; if (!this._init) { this._init = true; diff --git a/src/components/tap-click/activator.ts b/src/components/tap-click/activator.ts index 8cf814594e..c5ee712b1d 100644 --- a/src/components/tap-click/activator.ts +++ b/src/components/tap-click/activator.ts @@ -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; diff --git a/src/util/scroll-view.ts b/src/util/scroll-view.ts index 44e5f2f8c9..0dc0fae3d2 100644 --- a/src/util/scroll-view.ts +++ b/src/util/scroll-view.ts @@ -442,7 +442,7 @@ export class ScrollView { if (!self._el || !self.isScrolling || attempts > maxAttempts) { self.isScrolling = false; - self._el.style.transform = ``; + (self._el.style)[CSS.transform] = ''; done(); return; } @@ -468,7 +468,7 @@ export class ScrollView { } else { self.isScrolling = false; - self._el.style.transform = ``; + (self._el.style)[CSS.transform] = ''; done(); } }