mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2026-03-13 10:22:08 +08:00
style(all): minor changes
This commit is contained in:
@@ -3,6 +3,7 @@ import { Injectable, NgZone } from '@angular/core';
|
||||
import { Activator } from './activator';
|
||||
import { App } from '../app/app';
|
||||
import { Config } from '../../config/config';
|
||||
import { assert } from '../../util/util';
|
||||
import { hasPointerMoved, pointerCoord } from '../../util/dom';
|
||||
import { RippleActivator } from './ripple';
|
||||
import { UIEventManager, PointerEvents, PointerEventType } from '../../util/ui-event-manager';
|
||||
@@ -72,7 +73,7 @@ export class TapClick {
|
||||
if (!this.startCoord) {
|
||||
return;
|
||||
}
|
||||
if (type === PointerEventType.TOUCH && this.usePolyfill && this.app.isEnabled()) {
|
||||
if (this.usePolyfill && type === PointerEventType.TOUCH && this.app.isEnabled()) {
|
||||
this.handleTapPolyfill(ev);
|
||||
}
|
||||
if (this.activator) {
|
||||
@@ -109,6 +110,7 @@ export class TapClick {
|
||||
}
|
||||
|
||||
handleTapPolyfill(ev: any) {
|
||||
assert(this.usePolyfill, 'this code should not be used if tapPolyfill is disabled');
|
||||
// only dispatch mouse click events from a touchend event
|
||||
// when tapPolyfill config is true, and the startCoordand endCoord
|
||||
// are not too far off from each other
|
||||
|
||||
@@ -106,7 +106,7 @@ export const PLATFORM_CONFIGS: {[key: string]: PlatformConfig} = {
|
||||
keyboardHeight: 300,
|
||||
mode: 'ios',
|
||||
scrollAssist: isIOS,
|
||||
statusbarPadding: !!((<any>window).cordova),
|
||||
statusbarPadding: isCordova,
|
||||
swipeBackEnabled: isIOS,
|
||||
swipeBackThreshold: 40,
|
||||
tapPolyfill: isIOSUI,
|
||||
@@ -218,6 +218,9 @@ export const PLATFORM_CONFIGS: {[key: string]: PlatformConfig} = {
|
||||
}
|
||||
};
|
||||
|
||||
function isCordova(): boolean {
|
||||
return !!((<any>window).cordova);
|
||||
}
|
||||
|
||||
function isIOS(p: Platform): boolean {
|
||||
// shortcut function to be reused internally
|
||||
|
||||
@@ -140,9 +140,7 @@ export const isCheckedProperty = function(a: any, b: any): boolean {
|
||||
}
|
||||
|
||||
// not using strict comparison on purpose
|
||||
/* tslint:disable */
|
||||
return (a == b);
|
||||
/* tslint:enable */
|
||||
return (a == b); // tslint:disable-line
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user