@@ -3,13 +3,11 @@ import {View} from "ui/core/view";
3
3
import { Placeholder } from "ui/placeholder" ;
4
4
import { ContentView } from 'ui/content-view' ;
5
5
import { LayoutBase } from 'ui/layouts/layout-base' ;
6
- import { ViewClass , getViewClass , getViewMeta , isKnownView , ViewExtensions , NgView , ViewClassMeta } from './element-registry' ;
6
+ import { ViewClass , getViewClass , getViewMeta , isKnownView , ViewExtensions , NgView } from './element-registry' ;
7
7
import { getSpecialPropertySetter } from "ui/builder/special-properties" ;
8
- import * as styleProperty from "ui/styling/style-property" ;
9
8
import { StyleProperty , getPropertyByName , withStyleProperty } from "ui/styling/style-property" ;
10
9
import { ValueSource } from "ui/core/dependency-observable" ;
11
- import { ActionBar , ActionItem , NavigationButton } from "ui/action-bar" ;
12
- import { device , platformNames , Device } from "platform" ;
10
+ import { platformNames , Device } from "platform" ;
13
11
import { rendererLog as traceLog , styleError } from "./trace" ;
14
12
15
13
const IOS_PREFX : string = "@ios:" ;
@@ -160,7 +158,7 @@ export class ViewUtil {
160
158
}
161
159
162
160
private platformFilter ( attribute : string ) : string {
163
- var lowered = attribute . toLowerCase ( ) ;
161
+ let lowered = attribute . toLowerCase ( ) ;
164
162
if ( lowered . indexOf ( IOS_PREFX ) === 0 ) {
165
163
if ( this . isIos ) {
166
164
return attribute . substr ( IOS_PREFX . length ) ;
@@ -194,7 +192,7 @@ export class ViewUtil {
194
192
let propMap = this . getProperties ( view ) ;
195
193
let i = 0 ;
196
194
while ( i < properties . length - 1 && isDefined ( view ) ) {
197
- var prop = properties [ i ] ;
195
+ let prop = properties [ i ] ;
198
196
if ( propMap . has ( prop ) ) {
199
197
prop = propMap . get ( prop ) ;
200
198
}
@@ -237,7 +235,7 @@ export class ViewUtil {
237
235
return value ;
238
236
}
239
237
240
- var valueAsNumber = + value ;
238
+ let valueAsNumber = + value ;
241
239
if ( ! isNaN ( valueAsNumber ) ) {
242
240
return valueAsNumber ;
243
241
} else if ( value && ( value . toLowerCase ( ) === "true" || value . toLowerCase ( ) === "false" ) ) {
@@ -254,8 +252,8 @@ export class ViewUtil {
254
252
}
255
253
256
254
if ( ! propertyMaps . has ( type ) ) {
257
- var propMap = new Map < string , string > ( ) ;
258
- for ( var propName in instance ) {
255
+ let propMap = new Map < string , string > ( ) ;
256
+ for ( let propName in instance ) {
259
257
propMap . set ( propName . toLowerCase ( ) , propName ) ;
260
258
}
261
259
propertyMaps . set ( type , propMap ) ;
@@ -264,10 +262,10 @@ export class ViewUtil {
264
262
}
265
263
266
264
private cssClasses ( view : NgView ) {
267
- if ( ! view . cssClasses ) {
268
- view . cssClasses = new Map < string , boolean > ( ) ;
265
+ if ( ! view . ngCssClasses ) {
266
+ view . ngCssClasses = new Map < string , boolean > ( ) ;
269
267
}
270
- return view . cssClasses ;
268
+ return view . ngCssClasses ;
271
269
}
272
270
273
271
public addClass ( view : NgView , className : string ) : void {
@@ -317,7 +315,6 @@ export class ViewUtil {
317
315
withStyleProperty ( name , resolvedValue , ( property , value ) => {
318
316
if ( isString ( property ) ) {
319
317
//Fall back to resolving property by name.
320
- const propertyName = < string > property ;
321
318
const resolvedProperty = getPropertyByName ( name ) ;
322
319
if ( resolvedProperty ) {
323
320
this . setStyleValue ( view , resolvedProperty , resolvedValue ) ;
0 commit comments