mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
chore(css): fix transform prefixes
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user