Skip to content

Commit bb62477

Browse files
committed
chore: cleanup
1 parent ccec4dc commit bb62477

File tree

1 file changed

+2
-55
lines changed

1 file changed

+2
-55
lines changed

src/canvas.ios.ts

Lines changed: 2 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -33,59 +33,6 @@ function applyAttributesToNSAttributedString(text: NSAttributedString, attrs: NS
3333
return result;
3434
}
3535

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-
// }
8936
interface PaintDecoratorOptions {
9037
withFont?: boolean;
9138
}
@@ -1048,7 +995,7 @@ export class Paint implements IPaint {
1048995
return this.font.getUIFont(UIFont.systemFontOfSize(UIFont.labelFontSize));
1049996
}
1050997
getUIColor() {
1051-
return this._color && this._color.ios as UIColor;
998+
return this._color && (this._color.ios as UIColor);
1052999
}
10531000

10541001
public getTextSize(): number {
@@ -1071,7 +1018,7 @@ export class Paint implements IPaint {
10711018
set color(color: Color | number | string) {
10721019
if (color instanceof Color) {
10731020
this._color = color;
1074-
} else if (!!color){
1021+
} else if (!!color) {
10751022
this._color = new Color(color as any);
10761023
} else {
10771024
this._color = undefined;

0 commit comments

Comments
 (0)