Fix JS animated node value updating when listener is attached
Summary: The JS-side animated node values were not being updated on AnimatedValue (and thus AnimatedValueXY); however, the native event "onAnimatedValueUpdate" is being handled properly in AnimatedNode. It turns out that single underscore prefixed methods are obfuscated at FB. And thus AnimatedValue._onAnimatedValueUpdateReceived was not getting called. Changing the method name to double underscore as a way to denote "protected" fixes the issue. Changelog: [General][Fixed] - JS animated node value updates properly when listener is attached Reviewed By: yungsters Differential Revision: D33962038 fbshipit-source-id: c4f60e1f1ccc0cef3e65b89034bdb91376a26416
This commit is contained in:
Родитель
08faa130dd
Коммит
1f778014a7
|
@ -130,12 +130,12 @@ class AnimatedNode {
|
|||
if (data.tag !== this.__getNativeTag()) {
|
||||
return;
|
||||
}
|
||||
this._onAnimatedValueUpdateReceived(data.value);
|
||||
this.__onAnimatedValueUpdateReceived(data.value);
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
_onAnimatedValueUpdateReceived(value: number) {
|
||||
__onAnimatedValueUpdateReceived(value: number) {
|
||||
this.__callListeners(value);
|
||||
}
|
||||
|
||||
|
|
|
@ -211,7 +211,7 @@ class AnimatedValue extends AnimatedWithChildren {
|
|||
}
|
||||
}
|
||||
|
||||
_onAnimatedValueUpdateReceived(value: number): void {
|
||||
__onAnimatedValueUpdateReceived(value: number): void {
|
||||
this._updateValue(value, false /*flush*/);
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче