Context support for gesture handler binding

This commit is contained in:
Vladimir Enchev
2015-05-13 16:05:45 +03:00
parent d9216accca
commit 8d8fe1700b
6 changed files with 25 additions and 17 deletions

View File

@@ -194,7 +194,7 @@ function attachGestureBinding(instance: view.View, gestureName: string, value: s
var handler = instance.bindingContext && instance.bindingContext[getBindingExpressionFromAttribute(value)];
// Check if the handler is function and add it to the instance for specified event name.
if (types.isFunction(handler)) {
instance.observe(gestures.fromString(gestureName.toLowerCase()), handler);
instance.observe(gestures.fromString(gestureName.toLowerCase()), handler, instance.bindingContext);
}
instance.off(observable.Observable.propertyChangeEvent, propertyChangeHandler);
}