@@ -33,59 +33,6 @@ function applyAttributesToNSAttributedString(text: NSAttributedString, attrs: NS
33
33
return result ;
34
34
}
35
35
36
- // const enum MemberType {
37
- // Static,
38
- // Instance
39
- // }
40
-
41
- // function timelineProfileFunctionFactory<F extends Function>(fn: F, name: string, type: MemberType = MemberType.Instance): F {
42
- // let result;
43
- // if (type === MemberType.Instance) {
44
- // result = function() {
45
- // // const start = time();
46
- // console.log(name);
47
- // try {
48
- // return fn.apply(this, arguments);
49
- // } finally {
50
- // // const end = time();
51
- // // console.log(`Timeline: Modules: ${name} ${this} (${start}ms. - ${end}ms.)`);
52
- // }
53
- // };
54
- // } else {
55
- // result = function() {
56
- // // const start = time();
57
- // // console.log(`calling method: ${name}`);
58
- // try {
59
- // return fn.apply(this, arguments);
60
- // } finally {
61
- // // const end = time();
62
- // // console.log(`Timeline: Modules: ${name} (${start}ms. - ${end}ms.)`);
63
- // }
64
- // };
65
- // }
66
- // return result;
67
- // }
68
- // function profile(target?: string | Function | Object, key?, descriptor?: PropertyDescriptor): any {
69
- // // save a reference to the original method this way we keep the values currently in the
70
- // // descriptor and don't overwrite what another decorator might have done to the descriptor.
71
- // if (descriptor === undefined) {
72
- // descriptor = Object.getOwnPropertyDescriptor(target, key);
73
- // }
74
- // const originalMethod = descriptor.value;
75
-
76
- // let className = '';
77
- // if (target && target.constructor && target.constructor.name) {
78
- // className = target.constructor.name + '.';
79
- // }
80
-
81
- // const name = className + key;
82
-
83
- // // editing the descriptor/value parameter
84
- // descriptor.value = timelineProfileFunctionFactory(originalMethod, name, MemberType.Instance);
85
-
86
- // // return edited descriptor as opposed to overwriting the descriptor
87
- // return descriptor;
88
- // }
89
36
interface PaintDecoratorOptions {
90
37
withFont ?: boolean ;
91
38
}
@@ -1048,7 +995,7 @@ export class Paint implements IPaint {
1048
995
return this . font . getUIFont ( UIFont . systemFontOfSize ( UIFont . labelFontSize ) ) ;
1049
996
}
1050
997
getUIColor ( ) {
1051
- return this . _color && this . _color . ios as UIColor ;
998
+ return this . _color && ( this . _color . ios as UIColor ) ;
1052
999
}
1053
1000
1054
1001
public getTextSize ( ) : number {
@@ -1071,7 +1018,7 @@ export class Paint implements IPaint {
1071
1018
set color ( color : Color | number | string ) {
1072
1019
if ( color instanceof Color ) {
1073
1020
this . _color = color ;
1074
- } else if ( ! ! color ) {
1021
+ } else if ( ! ! color ) {
1075
1022
this . _color = new Color ( color as any ) ;
1076
1023
} else {
1077
1024
this . _color = undefined ;
0 commit comments