Fixed: bug when caching native backgrounds

This commit is contained in:
vakrilov
2015-07-06 16:17:03 +03:00
parent 6bb875cb8e
commit 3cf3d7184e

View File

@@ -29,7 +29,7 @@ function onBackgroundOrBorderPropertyChanged(v: view.View) {
var bkg = <background.ad.BorderDrawable>nativeView.getBackground();
if (!(bkg instanceof background.ad.BorderDrawable)) {
bkg = new background.ad.BorderDrawable();
let viewClass = types.getClass(view);
let viewClass = types.getClass(v);
if (!_defaultBackgrounds.has(viewClass)) {
_defaultBackgrounds.set(viewClass, nativeView.getBackground());
}
@@ -48,7 +48,7 @@ function onBackgroundOrBorderPropertyChanged(v: view.View) {
}
else {
// reset the value with the default native value
let viewClass = types.getClass(view);
let viewClass = types.getClass(v);
if (_defaultBackgrounds.has(viewClass)) {
v.android.setBackgroundDrawable(_defaultBackgrounds.get(viewClass));
}