chore: cleanup

This commit is contained in:
Nathan Walker
2020-07-06 14:25:11 -07:00
parent 94cf5c4706
commit 6336eac4b5
477 changed files with 59087 additions and 74961 deletions

View File

@@ -1,42 +1,38 @@
import { Color } from "../../color";
import { View, CSSType } from "../core/view";
import { booleanConverter } from "../core/view-base";
import { Property } from "../core/properties";
import { Switch as SwitchDefinition } from ".";
import { Color } from '../../color';
import { View, CSSType } from '../core/view';
import { booleanConverter } from '../core/view-base';
import { Property } from '../core/properties';
import { Switch as SwitchDefinition } from '.';
@CSSType("Switch")
@CSSType('Switch')
export class SwitchBase extends View implements SwitchDefinition {
public static checkedChangeEvent = "checkedChange";
public static checkedChangeEvent = 'checkedChange';
public checked: boolean;
public offBackgroundColor: Color;
public checked: boolean;
public offBackgroundColor: Color;
_onCheckedPropertyChanged(newValue: boolean) {
//
}
_onCheckedPropertyChanged(newValue: boolean) {
//
}
}
SwitchBase.prototype.recycleNativeView = "auto";
SwitchBase.prototype.recycleNativeView = 'auto';
function onCheckedPropertyChanged(
switchBase: SwitchBase,
oldValue: boolean,
newValue: boolean
) {
switchBase._onCheckedPropertyChanged(newValue);
function onCheckedPropertyChanged(switchBase: SwitchBase, oldValue: boolean, newValue: boolean) {
switchBase._onCheckedPropertyChanged(newValue);
}
export const checkedProperty = new Property<SwitchBase, boolean>({
name: "checked",
defaultValue: false,
valueConverter: booleanConverter,
valueChanged: onCheckedPropertyChanged,
name: 'checked',
defaultValue: false,
valueConverter: booleanConverter,
valueChanged: onCheckedPropertyChanged,
});
checkedProperty.register(SwitchBase);
export const offBackgroundColorProperty = new Property<SwitchBase, Color>({
name: "offBackgroundColor",
equalityComparer: Color.equals,
valueConverter: (v) => new Color(v),
name: 'offBackgroundColor',
equalityComparer: Color.equals,
valueConverter: (v) => new Color(v),
});
offBackgroundColorProperty.register(SwitchBase);