handlers fixed

This commit is contained in:
Vladimir Enchev
2015-11-02 10:54:22 +02:00
parent 176a2fb8a4
commit eb57f44633

View File

@@ -13,6 +13,14 @@ var btn;
global.moduleMerge(stylersCommon, exports);
var ignorePropertyHandler = new stylersCommon.StylePropertyChangedHandler(
(view, val) => {
// empty
},
(view, val) => {
// empty
});
var _defaultBackgrounds = new Map<string, android.graphics.drawable.Drawable>();
function onBackgroundOrBorderPropertyChanged(v: view.View) {
@@ -600,15 +608,14 @@ export class ProgressStyler implements definition.stylers.Styler {
ProgressStyler.setColorProperty,
ProgressStyler.resetColorProperty), "Progress");
var borderHandler = new stylersCommon.StylePropertyChangedHandler(
style.registerHandler(style.backgroundColorProperty, new stylersCommon.StylePropertyChangedHandler(
ProgressStyler.setBackgroundAndBorderProperty,
ProgressStyler.resetBackgroundAndBorderProperty);
ProgressStyler.resetBackgroundAndBorderProperty), "Progress");
style.registerHandler(style.backgroundColorProperty, borderHandler, "Progress");
style.registerHandler(style.borderWidthProperty, borderHandler, "Progress");
style.registerHandler(style.borderColorProperty, borderHandler, "Progress");
style.registerHandler(style.borderRadiusProperty, borderHandler, "Progress");
style.registerHandler(style.backgroundInternalProperty, borderHandler, "Progress");
style.registerHandler(style.borderWidthProperty, ignorePropertyHandler, "Progress");
style.registerHandler(style.borderColorProperty, ignorePropertyHandler, "Progress");
style.registerHandler(style.borderRadiusProperty, ignorePropertyHandler, "Progress");
style.registerHandler(style.backgroundInternalProperty, ignorePropertyHandler, "Progress");
}
}
@@ -638,15 +645,14 @@ export class SliderStyler implements definition.stylers.Styler {
SliderStyler.setColorProperty,
SliderStyler.resetColorProperty), "Slider");
var borderHandler = new stylersCommon.StylePropertyChangedHandler(
style.registerHandler(style.backgroundColorProperty, new stylersCommon.StylePropertyChangedHandler(
SliderStyler.setBackgroundAndBorderProperty,
SliderStyler.resetBackgroundAndBorderProperty);
SliderStyler.resetBackgroundAndBorderProperty), "Slider");
style.registerHandler(style.backgroundColorProperty, borderHandler, "Slider");
style.registerHandler(style.borderWidthProperty, borderHandler, "Slider");
style.registerHandler(style.borderColorProperty, borderHandler, "Slider");
style.registerHandler(style.borderRadiusProperty, borderHandler, "Slider");
style.registerHandler(style.backgroundInternalProperty, borderHandler, "Slider");
style.registerHandler(style.borderWidthProperty, ignorePropertyHandler, "Slider");
style.registerHandler(style.borderColorProperty, ignorePropertyHandler, "Slider");
style.registerHandler(style.borderRadiusProperty, ignorePropertyHandler, "Slider");
style.registerHandler(style.backgroundInternalProperty, ignorePropertyHandler, "Slider");
}
}
@@ -684,15 +690,14 @@ export class SwitchStyler implements definition.stylers.Styler {
SwitchStyler.setColorProperty,
SwitchStyler.resetColorProperty), "Switch");
var borderHandler = new stylersCommon.StylePropertyChangedHandler(
style.registerHandler(style.backgroundColorProperty, new stylersCommon.StylePropertyChangedHandler(
SwitchStyler.setBackgroundAndBorderProperty,
SwitchStyler.resetBackgroundAndBorderProperty);
SwitchStyler.resetBackgroundAndBorderProperty), "Switch");
style.registerHandler(style.backgroundColorProperty, borderHandler, "Switch");
style.registerHandler(style.borderWidthProperty, borderHandler, "Switch");
style.registerHandler(style.borderColorProperty, borderHandler, "Switch");
style.registerHandler(style.borderRadiusProperty, borderHandler, "Switch");
style.registerHandler(style.backgroundInternalProperty, borderHandler, "Switch");
style.registerHandler(style.borderWidthProperty, ignorePropertyHandler, "Switch");
style.registerHandler(style.borderColorProperty, ignorePropertyHandler, "Switch");
style.registerHandler(style.borderRadiusProperty, ignorePropertyHandler, "Switch");
style.registerHandler(style.backgroundInternalProperty, ignorePropertyHandler, "Switch");
}
}