refactoring circular imports

This commit is contained in:
Hristo Hristov
2017-03-06 14:01:22 +02:00
parent 347755367e
commit ea22eb9c20
82 changed files with 2229 additions and 2188 deletions

View File

@@ -1,7 +1,7 @@
import * as labelModule from "ui/label";
import * as enums from "ui/enums";
import * as colorModule from "color";
import * as utilsModule from "utils/utils";
import { getColor } from "../helper";
export function getNativeTextAlignment(label: labelModule.Label): string {
switch (label.ios.textAlignment) {
@@ -22,5 +22,5 @@ export function getNativeBackgroundColor(label: labelModule.Label): colorModule.
return undefined;
}
var uiColor = UIColor.colorWithCGColor(layer.backgroundColor);
return utilsModule.ios.getColor(uiColor);
return getColor(uiColor);
}

View File

@@ -239,13 +239,13 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
actualTextSize = testLabel.ios.font.pointSize;
TKUnit.assertEqual(actualTextSize, fontSize, "Wrong native FontSize");
normalColor = utils.ios.getColor(testLabel.ios.textColor);
normalColor = helper.getColor(testLabel.ios.textColor);
expColor = new colorModule.Color(color);
TKUnit.assertEqual(normalColor.hex, expColor.hex);
const cgColor = (<UILabel>testLabel.ios).layer.backgroundColor;
const uiColor = UIColor.colorWithCGColor(cgColor);
actualBackgroundColor = utils.ios.getColor(uiColor);
actualBackgroundColor = helper.getColor(uiColor);
expBackgroundColor = new colorModule.Color(backgroundColor);
TKUnit.assertEqual(actualBackgroundColor.hex, expBackgroundColor.hex);
}