style(all): minor changes

This commit is contained in:
Manu Mtz.-Almeida
2016-11-20 16:00:17 +01:00
parent c002b36a56
commit 6f96ede2ea
3 changed files with 8 additions and 5 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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
};