chore: format

This commit is contained in:
Nathan Walker
2020-07-05 14:57:06 -07:00
parent 8f2900ad0b
commit da3c0b973d
379 changed files with 71587 additions and 54582 deletions

View File

@@ -1,6 +1,9 @@
import { ActivityIndicatorBase, busyProperty } from "./activity-indicator-common";
import { colorProperty } from '../styling/style-properties';
import { Color } from '../../color';
import {
ActivityIndicatorBase,
busyProperty,
} from "./activity-indicator-common";
import { colorProperty } from "../styling/style-properties";
import { Color } from "../../color";
import { ios } from "../../utils/utils";
export * from "./activity-indicator-common";
@@ -8,47 +11,52 @@ export * from "./activity-indicator-common";
const majorVersion = ios.MajorVersion;
export class ActivityIndicator extends ActivityIndicatorBase {
nativeViewProtected: UIActivityIndicatorView;
nativeViewProtected: UIActivityIndicatorView;
private _activityIndicatorViewStyle = (majorVersion <= 12 || !UIActivityIndicatorViewStyle.Medium) ? UIActivityIndicatorViewStyle.Gray : UIActivityIndicatorViewStyle.Medium;
private _activityIndicatorViewStyle =
majorVersion <= 12 || !UIActivityIndicatorViewStyle.Medium
? UIActivityIndicatorViewStyle.Gray
: UIActivityIndicatorViewStyle.Medium;
createNativeView() {
const viewStyle = this._activityIndicatorViewStyle;
const view = UIActivityIndicatorView.alloc().initWithActivityIndicatorStyle(viewStyle);
view.hidesWhenStopped = true;
createNativeView() {
const viewStyle = this._activityIndicatorViewStyle;
const view = UIActivityIndicatorView.alloc().initWithActivityIndicatorStyle(
viewStyle
);
view.hidesWhenStopped = true;
return view;
}
return view;
}
get ios(): UIActivityIndicatorView {
return this.nativeViewProtected;
}
get ios(): UIActivityIndicatorView {
return this.nativeViewProtected;
}
[busyProperty.getDefault](): boolean {
if ((<any>this.nativeViewProtected).isAnimating) {
return (<any>this.nativeViewProtected).isAnimating();
}
else {
return this.nativeViewProtected.animating;
}
}
[busyProperty.setNative](value: boolean) {
let nativeView = this.nativeViewProtected;
if (value) {
nativeView.startAnimating();
} else {
nativeView.stopAnimating();
}
[busyProperty.getDefault](): boolean {
if ((<any>this.nativeViewProtected).isAnimating) {
return (<any>this.nativeViewProtected).isAnimating();
} else {
return this.nativeViewProtected.animating;
}
}
[busyProperty.setNative](value: boolean) {
let nativeView = this.nativeViewProtected;
if (value) {
nativeView.startAnimating();
} else {
nativeView.stopAnimating();
}
if (nativeView.hidesWhenStopped) {
this.requestLayout();
}
}
if (nativeView.hidesWhenStopped) {
this.requestLayout();
}
}
[colorProperty.getDefault](): UIColor {
return this.nativeViewProtected.color;
}
[colorProperty.setNative](value: UIColor | Color) {
this.nativeViewProtected.color = value instanceof Color ? value.ios : value;
}
[colorProperty.getDefault](): UIColor {
return this.nativeViewProtected.color;
}
[colorProperty.setNative](value: UIColor | Color) {
this.nativeViewProtected.color =
value instanceof Color ? value.ios : value;
}
}