chore: clang-reformat
This commit is contained in:
@ -120,7 +120,8 @@ export class Animation {
|
||||
* @param classes
|
||||
*/
|
||||
removeClasses(classes: string[]): void {
|
||||
for (let i = 0, len = classes.length; i < len; i++) getDOM().removeClass(this.element, classes[i]);
|
||||
for (let i = 0, len = classes.length; i < len; i++)
|
||||
getDOM().removeClass(this.element, classes[i]);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -128,8 +129,9 @@ export class Animation {
|
||||
*/
|
||||
addEvents(): void {
|
||||
if (this.totalTime > 0) {
|
||||
this.eventClearFunctions.push(getDOM().onAndCancel(
|
||||
this.element, getDOM().getTransitionEnd(), (event: any) => this.handleAnimationEvent(event)));
|
||||
this.eventClearFunctions.push(
|
||||
getDOM().onAndCancel(this.element, getDOM().getTransitionEnd(),
|
||||
(event: any) => this.handleAnimationEvent(event)));
|
||||
} else {
|
||||
this.handleAnimationCompleted();
|
||||
}
|
||||
|
@ -14,7 +14,8 @@ export class BrowserDetails {
|
||||
*/
|
||||
doesElapsedTimeIncludesDelay(): void {
|
||||
var div = getDOM().createElement('div');
|
||||
getDOM().setAttribute(div, 'style', `position: absolute; top: -9999px; left: -9999px; width: 1px;
|
||||
getDOM().setAttribute(div, 'style',
|
||||
`position: absolute; top: -9999px; left: -9999px; width: 1px;
|
||||
height: 1px; transition: all 1ms linear 1ms;`);
|
||||
// Firefox requires that we wait for 2 frames for some reason
|
||||
this.raf((timestamp: any) => {
|
||||
|
@ -28,7 +28,7 @@ import {
|
||||
HAMMER_GESTURE_CONFIG,
|
||||
HammerGestureConfig,
|
||||
HammerGesturesPlugin
|
||||
} from './dom/events/hammer_gestures'
|
||||
} from './dom/events/hammer_gestures';
|
||||
import {DomSharedStylesHost} from './dom/shared_styles_host';
|
||||
import {AnimationBuilder} from './animate/animation_builder';
|
||||
import {BrowserDetails} from './animate/browser_details';
|
||||
@ -97,7 +97,8 @@ export {
|
||||
} from '../src/dom/events/hammer_gestures'
|
||||
|
||||
|
||||
export function initDomAdapter() {
|
||||
export function
|
||||
initDomAdapter() {
|
||||
BrowserDomAdapter.makeCurrent();
|
||||
wtfInit();
|
||||
BrowserGetTestability.init();
|
||||
|
@ -1,4 +1,11 @@
|
||||
import {DebugNode, getDebugNode, Provider, RootRenderer, NgZone, ApplicationRef} from '@angular/core';
|
||||
import {
|
||||
DebugNode,
|
||||
getDebugNode,
|
||||
Provider,
|
||||
RootRenderer,
|
||||
NgZone,
|
||||
ApplicationRef
|
||||
} from '@angular/core';
|
||||
import {DebugDomRootRenderer} from '../../../core_private';
|
||||
import {assertionsEnabled} from '../../facade/lang';
|
||||
import {getDOM} from '../dom_adapter';
|
||||
|
@ -2,11 +2,11 @@ import {isBlank, Type} from '../../src/facade/lang';
|
||||
|
||||
var _DOM: DomAdapter = null;
|
||||
|
||||
export function getDOM(){
|
||||
export function getDOM() {
|
||||
return _DOM;
|
||||
}
|
||||
|
||||
export function setDOM(adapter:DomAdapter){
|
||||
export function setDOM(adapter: DomAdapter) {
|
||||
_DOM = adapter;
|
||||
}
|
||||
|
||||
|
@ -7,7 +7,7 @@ import {
|
||||
RenderComponentType,
|
||||
ViewEncapsulation
|
||||
} from '@angular/core';
|
||||
import {RenderDebugInfo} from '../../core_private'
|
||||
import {RenderDebugInfo} from '../../core_private';
|
||||
import {AnimationBuilder} from '../animate/animation_builder';
|
||||
import {
|
||||
isPresent,
|
||||
@ -201,11 +201,12 @@ export class DomRenderer implements Renderer {
|
||||
var dashCasedPropertyName = camelCaseToDashCase(propertyName);
|
||||
if (getDOM().isCommentNode(renderElement)) {
|
||||
var existingBindings = RegExpWrapper.firstMatch(
|
||||
TEMPLATE_BINDINGS_EXP, StringWrapper.replaceAll(getDOM().getText(renderElement), /\n/g, ''));
|
||||
TEMPLATE_BINDINGS_EXP,
|
||||
StringWrapper.replaceAll(getDOM().getText(renderElement), /\n/g, ''));
|
||||
var parsedBindings = Json.parse(existingBindings[1]);
|
||||
parsedBindings[dashCasedPropertyName] = propertyValue;
|
||||
getDOM().setText(renderElement, StringWrapper.replace(TEMPLATE_COMMENT_TEXT, '{}',
|
||||
Json.stringify(parsedBindings)));
|
||||
Json.stringify(parsedBindings)));
|
||||
} else {
|
||||
this.setElementAttribute(renderElement, propertyName, propertyValue);
|
||||
}
|
||||
|
@ -33,7 +33,7 @@ export class KeyEventsPlugin extends EventManagerPlugin {
|
||||
|
||||
return this.manager.getZone().runOutsideAngular(() => {
|
||||
return getDOM().onAndCancel(element, StringMapWrapper.get(parsedEvent, 'domEventName'),
|
||||
outsideHandler);
|
||||
outsideHandler);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -9,7 +9,11 @@ import {
|
||||
} from '@angular/core';
|
||||
|
||||
import {Type, isPresent, isBlank} from './facade/lang';
|
||||
import {BROWSER_APP_COMMON_PROVIDERS, BROWSER_PROVIDERS, BROWSER_PLATFORM_MARKER} from './browser_common';
|
||||
import {
|
||||
BROWSER_APP_COMMON_PROVIDERS,
|
||||
BROWSER_PROVIDERS,
|
||||
BROWSER_PLATFORM_MARKER
|
||||
} from './browser_common';
|
||||
export {ELEMENT_PROBE_PROVIDERS} from './dom/debug/ng_probe';
|
||||
export {BrowserPlatformLocation} from './browser/location/browser_platform_location';
|
||||
export {
|
||||
@ -45,8 +49,8 @@ export function bootstrapStatic(appComponentType: Type,
|
||||
initReflector();
|
||||
}
|
||||
|
||||
let appProviders =
|
||||
isPresent(customProviders) ? [BROWSER_APP_STATIC_PROVIDERS, customProviders] : BROWSER_APP_STATIC_PROVIDERS;
|
||||
let appProviders = isPresent(customProviders) ? [BROWSER_APP_STATIC_PROVIDERS, customProviders] :
|
||||
BROWSER_APP_STATIC_PROVIDERS;
|
||||
var appInjector =
|
||||
ReflectiveInjector.resolveAndCreate(appProviders, browserStaticPlatform().injector);
|
||||
return coreLoadAndBootstrap(appInjector, appComponentType);
|
||||
|
@ -4,10 +4,7 @@ import {
|
||||
import {UrlChangeListener} from '@angular/common';
|
||||
import {Injectable} from '@angular/core/src/di';
|
||||
import {ROUTER_CHANNEL} from '../shared/messaging_api';
|
||||
import {
|
||||
ServiceMessageBrokerFactory,
|
||||
ServiceMessageBroker
|
||||
} from '../shared/service_message_broker';
|
||||
import {ServiceMessageBrokerFactory, ServiceMessageBroker} from '../shared/service_message_broker';
|
||||
import {PRIMITIVE, Serializer} from '../shared/serializer';
|
||||
import {bind} from './bind';
|
||||
import {LocationType} from '../shared/serialized_types';
|
||||
|
@ -34,7 +34,9 @@ import {
|
||||
ClientMessageBrokerFactory,
|
||||
ClientMessageBrokerFactory_
|
||||
} from '../web_workers/shared/client_message_broker';
|
||||
import {BrowserPlatformLocation} from '@angular/platform-browser/src/browser/location/browser_platform_location';
|
||||
import {
|
||||
BrowserPlatformLocation
|
||||
} from '@angular/platform-browser/src/browser/location/browser_platform_location';
|
||||
import {Serializer} from '../web_workers/shared/serializer';
|
||||
import {ON_WEB_WORKER} from '../web_workers/shared/api';
|
||||
import {RenderStore} from '../web_workers/shared/render_store';
|
||||
|
@ -12,10 +12,7 @@ import {
|
||||
assertPlatform
|
||||
} from '@angular/core';
|
||||
|
||||
export {
|
||||
WORKER_APP_PLATFORM,
|
||||
WORKER_APP_APPLICATION_COMMON
|
||||
} from './webworker/worker_app_common';
|
||||
export {WORKER_APP_PLATFORM, WORKER_APP_APPLICATION_COMMON} from './webworker/worker_app_common';
|
||||
export {WORKER_APP_APPLICATION} from './webworker/worker_app';
|
||||
export {
|
||||
ClientMessageBroker,
|
||||
|
Reference in New Issue
Block a user