Sağladığınız PanResponder belge sayfasına (https://facebook.github.io/react-native/docs/panresponder.html) bakarak, ihtiyacınızı karşılamak için örneği değiştirebilirsiniz. gestureState nesne şöyle Nerede
_handlePanResponderMove: function(e: Object, gestureState: Object) {
this._circleStyles.style.left = this._previousLeft + gestureState.dx;
this._circleStyles.style.top = this._previousTop + gestureState.dy;
this._updateNativeStyles();
},
:
bir jest cevaben harekete sorumlu fonksiyon PanResponder bir özelliği gibi bu görünüyor belgelerinden örnek kodda, onPanResponderMove denilen olduğunu
stateID - ID of the gestureState- persisted as long as there at least one touch on screen
moveX - the latest screen coordinates of the recently-moved touch
moveY - the latest screen coordinates of the recently-moved touch
x0 - the screen coordinates of the responder grant
y0 - the screen coordinates of the responder grant
dx - accumulated distance of the gesture since the touch started
dy - accumulated distance of the gesture since the touch started
vx - current velocity of the gesture
vy - current velocity of the gesture
numberActiveTouches - Number of touches currently on screen
Sen gestureState.y0 bazı eşiğin altına olup olmadığını belirlemek için _handlePanResponderMove bir şartlı onay ekleyin ve sadece bir değişiklik geçerli olabilir eğer öyleyse
Hey AlexB! Görünüşe göre @jaws'ın cevabı işe yaradı. Cevabı uyguladıktan sonra nasıl göründüğünün bir örneğini paylaşır mısınız? Teşekkürler –