mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
refactoring circular imports
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user