From 25d54e0ed748ce973f6c88f466c7233815c92a82 Mon Sep 17 00:00:00 2001 From: Rossen Hristov Date: Mon, 23 Mar 2015 09:57:46 +0200 Subject: [PATCH] Fixed several compile issues. --- ui/core/view-common.ts | 15 +-------------- ui/core/view.d.ts | 11 +---------- ui/layouts/grid-layout/grid-layout.ts | 2 +- ui/styling/converters.ts | 1 - ui/styling/css-selector.ts | 1 - 5 files changed, 3 insertions(+), 27 deletions(-) diff --git a/ui/core/view-common.ts b/ui/core/view-common.ts index 7dcd4b09e..57ca9cabd 100644 --- a/ui/core/view-common.ts +++ b/ui/core/view-common.ts @@ -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; } diff --git a/ui/core/view.d.ts b/ui/core/view.d.ts index 0424f8429..fa0349aae 100644 --- a/ui/core/view.d.ts +++ b/ui/core/view.d.ts @@ -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; diff --git a/ui/layouts/grid-layout/grid-layout.ts b/ui/layouts/grid-layout/grid-layout.ts index 029906d99..c62b96de0 100644 --- a/ui/layouts/grid-layout/grid-layout.ts +++ b/ui/layouts/grid-layout/grid-layout.ts @@ -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 { diff --git a/ui/styling/converters.ts b/ui/styling/converters.ts index dd4fec3ae..0dcf03d0e 100644 --- a/ui/styling/converters.ts +++ b/ui/styling/converters.ts @@ -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); diff --git a/ui/styling/css-selector.ts b/ui/styling/css-selector.ts index 49c648983..6027e6e68 100644 --- a/ui/styling/css-selector.ts +++ b/ui/styling/css-selector.ts @@ -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); } }