mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fixed several compile issues.
This commit is contained in:
@@ -106,7 +106,7 @@ function onCssClassPropertyChanged(data: dependencyObservable.PropertyChangeData
|
||||
new proxy.PropertyMetadata(true)
|
||||
);
|
||||
|
||||
export class View extends proxy.ProxyObject implements definition.View, definition.ApplyXmlAttributes {
|
||||
export class View extends proxy.ProxyObject implements definition.View {
|
||||
|
||||
public static idProperty = idProperty;
|
||||
public static cssClassProperty = cssClassProperty;
|
||||
@@ -906,19 +906,6 @@ export class View extends proxy.ProxyObject implements definition.View, definiti
|
||||
return this._isVisibleCache;
|
||||
}
|
||||
|
||||
applyXmlAttribute(attributeName: string, attributeValue: any): boolean {
|
||||
//if (attributeName === "margin") {
|
||||
// this.style.margin = attributeValue;
|
||||
// return true;
|
||||
//}
|
||||
//else if (attributeName === "padding") {
|
||||
// this.style.padding = attributeValue;
|
||||
// return true;
|
||||
//}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public focus(): boolean {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
11
ui/core/view.d.ts
vendored
11
ui/core/view.d.ts
vendored
@@ -4,7 +4,6 @@ declare module "ui/core/view" {
|
||||
import proxy = require("ui/core/proxy");
|
||||
import gestures = require("ui/gestures");
|
||||
import color = require("color");
|
||||
import styling = require("ui/styling");
|
||||
|
||||
/**
|
||||
* Gets a child view by id.
|
||||
@@ -109,7 +108,7 @@ declare module "ui/core/view" {
|
||||
* This class is the base class for all UI components.
|
||||
* A View occupies a rectangular area on the screen and is responsible for drawing and layouting of all UI components within.
|
||||
*/
|
||||
export class View extends proxy.ProxyObject/* implements ApplyXmlAttributes*/ {
|
||||
export class View extends proxy.ProxyObject {
|
||||
/**
|
||||
* Represents the observable property backing the id property of each View.
|
||||
*/
|
||||
@@ -369,14 +368,6 @@ declare module "ui/core/view" {
|
||||
onUnloaded(): void;
|
||||
isLoaded: boolean;
|
||||
|
||||
/**
|
||||
* Called for every attribute in xml declaration. <... fontAttributes="bold" ../>
|
||||
* @param attributeName - the name of the attribute (fontAttributes)
|
||||
* @param attrValue - the value of the attribute (bold)
|
||||
* Should return true if this attribute is handled and there is no need default handler to process it.
|
||||
*/
|
||||
applyXmlAttribute(attributeName: string, attrValue: any): boolean;
|
||||
|
||||
// TODO: Implement logic for stripping these lines out
|
||||
//@private
|
||||
_domId: number;
|
||||
|
||||
@@ -456,7 +456,7 @@ export class GridLayout extends layouts.Layout implements definition.GridLayout,
|
||||
return true;
|
||||
}
|
||||
|
||||
return super.applyXmlAttribute(attributeName, attributeValue);
|
||||
return false;
|
||||
}
|
||||
|
||||
private static parseItemSpecs(value: string): Array<ItemSpec> {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import color = require("color");
|
||||
import enums = require("ui/enums");
|
||||
import types = require("utils/types");
|
||||
|
||||
export function colorConverter(value: string): color.Color {
|
||||
return new color.Color(value);
|
||||
|
||||
@@ -48,7 +48,6 @@ export class CssSelector {
|
||||
if (property) {
|
||||
resolvedValue = this._declarations[i].value;
|
||||
// The property.valueConverter is now used to convert the value later on in DependencyObservable._setValueInternal.
|
||||
console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>");
|
||||
callback(property, resolvedValue);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user