mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Let about 300 non UI tests run
This commit is contained in:
@@ -542,7 +542,7 @@ interface NativePercentLengthPropertyOptions {
|
||||
setPercent?: NativeSetter
|
||||
}
|
||||
function createNativePercentLengthProperty({key, auto = 0, getPixels, setPixels, setPercent = percentNotSupported}: NativePercentLengthPropertyOptions) {
|
||||
Object.defineProperty(View, key, {
|
||||
Object.defineProperty(View.prototype, key, {
|
||||
get: function (this: View) { return { value: getPixels(this.nativeView), unit: "px" } },
|
||||
set: function (this: View, length: PercentLength) {
|
||||
if (length == "auto") {
|
||||
|
||||
4
tns-core-modules/ui/core/view.d.ts
vendored
4
tns-core-modules/ui/core/view.d.ts
vendored
@@ -104,10 +104,10 @@ declare module "ui/core/view" {
|
||||
export function equals(a: Length, b: Length): boolean;
|
||||
/**
|
||||
* Converts Length unit to device pixels.
|
||||
* @param length The PercentLength to convert.
|
||||
* @param length The Length to convert.
|
||||
* @param auto Value to use for conversion of "auto".
|
||||
*/
|
||||
export function toDevicePixels(length: PercentLength, auto: number): number;
|
||||
export function toDevicePixels(length: Length, auto: number): number;
|
||||
}
|
||||
|
||||
export type PercentLength = "auto" | number | {
|
||||
|
||||
@@ -3,6 +3,9 @@ import { View, layout, Property } from "ui/core/view";
|
||||
|
||||
export * from "ui/core/view";
|
||||
|
||||
// TODO: Can we use Label.ios optimization for affectsLayout???
|
||||
export const htmlProperty = new Property<HtmlView, string>({ name: "html", defaultValue: "", affectsLayout: true });
|
||||
|
||||
export class HtmlView extends View implements HtmlViewDefinition {
|
||||
private _ios: UITextView;
|
||||
|
||||
@@ -70,6 +73,4 @@ export class HtmlView extends View implements HtmlViewDefinition {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: Can we use Label.ios optimization for affectsLayout???
|
||||
export const htmlProperty = new Property<HtmlView, string>({ name: "html", defaultValue: "", affectsLayout: true });
|
||||
htmlProperty.register(HtmlView);
|
||||
@@ -6,6 +6,8 @@ import { File, knownFolders, path } from "file-system";
|
||||
export { File, knownFolders, path };
|
||||
export * from "ui/core/view";
|
||||
|
||||
export const srcProperty = new Property<WebViewBase, string>({ name: "url" });
|
||||
|
||||
export abstract class WebViewBase extends View implements WebViewDefinition {
|
||||
public static loadStartedEvent = "loadStarted";
|
||||
public static loadFinishedEvent = "loadFinished";
|
||||
@@ -103,5 +105,4 @@ export abstract class WebViewBase extends View implements WebViewDefinition {
|
||||
}
|
||||
}
|
||||
|
||||
export const srcProperty = new Property<WebViewBase, string>({ name: "url" });
|
||||
srcProperty.register(WebViewBase);
|
||||
Reference in New Issue
Block a user