Fix: java.lang.NumberFormatException when applying clip-path with percentage values

Resolves #3007
This commit is contained in:
Rossen Hristov
2016-11-02 16:59:06 +02:00
parent d045306a2c
commit 28f084e7d2
5 changed files with 28 additions and 1 deletions

View File

@@ -67,7 +67,7 @@ export module ad {
_defaultBackgrounds.set(viewClass, nativeView.getBackground());
}
backgroundDrawable = new org.nativescript.widgets.BorderDrawable(density);
backgroundDrawable = new org.nativescript.widgets.BorderDrawable(density, v.toString());
refreshBorderDrawable(v, <org.nativescript.widgets.BorderDrawable>backgroundDrawable);
nativeView.setBackground(backgroundDrawable);
}
@@ -116,6 +116,7 @@ export module ad {
}
function refreshBorderDrawable(view: view.View, borderDrawable: org.nativescript.widgets.BorderDrawable){
//console.log(`>>> refreshBorderDrawable(${view})...`);
let background = <background.Background>view.style._getValue(style.backgroundInternalProperty);
if (background){
let backgroundPositionParsedCSSValues: native.Array<org.nativescript.widgets.CSSValue> = null;
@@ -154,6 +155,7 @@ function refreshBorderDrawable(view: view.View, borderDrawable: org.nativescript
background.size,
backgroundSizeParsedCSSValues
);
//console.log(`>>> ${borderDrawable.toDebugString()}`);
}
}